summaryrefslogtreecommitdiff
path: root/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
diff options
context:
space:
mode:
authorTrevor Bouchillon <[email protected]>2022-10-30 16:18:24 -0700
committerTrevor Bouchillon <[email protected]>2022-10-30 16:18:24 -0700
commitb86a96c227535c0a1206f0436adb4b4725f4161b (patch)
tree29815ca9e896d18542e15169643f190c3ae34719 /CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
parentCreated variables for filenames (diff)
downloadcst116-ch11-debugging-daboochillin-b86a96c227535c0a1206f0436adb4b4725f4161b.tar.xz
cst116-ch11-debugging-daboochillin-b86a96c227535c0a1206f0436adb4b4725f4161b.zip
Bug Fix
Diffstat (limited to 'CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp')
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
index 5d802b0..7251819 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
@@ -113,7 +113,7 @@ int main()
{
cout << "Trouble Opening: " << InFileName;
cout << "\n\n\t\t ** About to EXIT NOW! ** ";
- }
+ }
return 0;
}
int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
@@ -135,7 +135,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++) //made r a less than rather than less than or equal to.
{
outFile << setiosflags(ios::left) << setw(25)
<< name[r] << setw(4)