summaryrefslogtreecommitdiff
path: root/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
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 /CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
parentInitial commit (diff)
downloadcst116-ch11-debugging-nathanturcas-master.tar.xz
cst116-ch11-debugging-nathanturcas-master.zip
Diffstat (limited to 'CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp')
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp12
1 files changed, 6 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)