summaryrefslogtreecommitdiff
path: root/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp')
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
index a0295db..ffbcaa4 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
@@ -68,8 +68,10 @@ const int EMPLOYEES = 20;
const int MAX = 21;
int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[]);
+
void WriteOutputFile(ofstream& outFile, char name[][MAX], int age[],
int counter);
+
void PrintTotalsAndSummary(ofstream& out, int totalRecords);
int main()
@@ -78,12 +80,13 @@ int main()
int age[EMPLOYEES];
int record_counter(0);
- ifstream inFile("C:\\TEMP\\Chap_11_Report.txt");
+ ifstream inFile;
// Notice how this automatically opens the file
- ofstream outFile;
+ ofstream outFile("C:\\TEMP\\names.txt");
+
+ inFile.open("C:\\TEMP\\names.txt");
- inFile.open("C:\\TEMP\\Chap_11_data.txt");
if (inFile.is_open())
{