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.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
index ffbcaa4..f1212c3 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
@@ -67,6 +67,7 @@ using std::ofstream;
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[],
@@ -79,6 +80,7 @@ int main()
char name[EMPLOYEES][MAX];
int age[EMPLOYEES];
int record_counter(0);
+ int totalRecords;
ifstream inFile;
@@ -112,10 +114,11 @@ int main()
}
return 0;
}
-int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
+int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
{
int counter = 0;
- inFile >> name[counter] >> age[counter]; // Priming Read
+
+ inFile >> name[counter] >> age[counter]; // Priming Read
while (!inFile.eof())
{