summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanturcas <[email protected]>2022-12-05 00:07:40 -0800
committerNathanturcas <[email protected]>2022-12-05 00:07:40 -0800
commit1cf91241dc87158cf4364420812c1b289a386aa4 (patch)
treeb7c90f2e5daa9aab6be78ef5fca4e682b00f411b
parentInitial commit (diff)
downloadcst116-ch11-debugging-nathanturcas-1cf91241dc87158cf4364420812c1b289a386aa4.tar.xz
cst116-ch11-debugging-nathanturcas-1cf91241dc87158cf4364420812c1b289a386aa4.zip
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp12
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj4
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters4
-rw-r--r--Chap_11_Report.txt0
-rw-r--r--Chap_11_Report2.txt0
-rw-r--r--Chap_11_Report_output.txt0
6 files changed, 14 insertions, 6 deletions
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
index 53830da..22ac28f 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
@@ -1,6 +1,6 @@
/********************************************************************
* File: Chapter 11 Debug.cpp
-*
+*Nathan Turcas
* General Instructions: Complete each step before proceeding to the
* next.
*
@@ -81,9 +81,9 @@ int main()
ifstream inFile;
// Notice how this automatically opens the file
- ofstream outFile("C:\\TEMP\\Chap_11_Report.txt");
+ ofstream outFile("C:\\Apps\\Cst116\\cst116-ch11-debugging-nathanturcas3\\Chap_11_Report_output.txt");
- inFile.open("C:\\TEMP\\Chap_11_data.txt");
+ inFile.open("C:\\Apps\\Cst116\\cst116-ch11-debugging-nathanturcas3\\Chap_11_data_input.txt");
if (inFile.is_open())
{
@@ -98,13 +98,13 @@ int main()
}
else
{
- cout << "Trouble Opening File";
+ cout << "Trouble Opening File Chap_11_Report_output" ;
cout << "\n\n\t\t ** About to EXIT NOW! ** ";
}
}
else
{
- cout << "Trouble Opening File";
+ cout << "Trouble Opening File Chap_11_data_input.txt";
cout << "\n\n\t\t ** About to EXIT NOW! ** ";
}
return 0;
@@ -128,7 +128,7 @@ int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
void WriteOutputFile(ofstream& outFile, char name[][MAX], int age[], int counter)
{
outFile << " Here is the Output File" << endl;
- for (int r = 0; r <= counter; r++)
+ for (int r = 0; r < counter; r++)
{
outFile << setiosflags(ios::left) << setw(25)
<< name[r] << setw(4)
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj
index 2073e5b..0222768 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj
@@ -129,6 +129,10 @@
<ItemGroup>
<ClCompile Include="CST116-Ch11-Debugging.cpp" />
</ItemGroup>
+ <ItemGroup>
+ <Text Include="..\Chap_11_data.txt" />
+ <Text Include="..\Chap_11_Report.txt" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters
index 2029dc7..7683ed3 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters
@@ -19,4 +19,8 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Text Include="..\Chap_11_data.txt" />
+ <Text Include="..\Chap_11_Report.txt" />
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/Chap_11_Report.txt b/Chap_11_Report.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Chap_11_Report.txt
diff --git a/Chap_11_Report2.txt b/Chap_11_Report2.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Chap_11_Report2.txt
diff --git a/Chap_11_Report_output.txt b/Chap_11_Report_output.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Chap_11_Report_output.txt