summaryrefslogtreecommitdiff
path: root/CST116-Ch11-Debugging
diff options
context:
space:
mode:
authoralexandra-apetroaei <andra@MSI>2022-11-02 22:26:59 -0800
committeralexandra-apetroaei <andra@MSI>2022-11-02 22:26:59 -0800
commit5a9653ed640e7cc1e4eb85fd11ad0379296c7ccc (patch)
treefff1a9c5e1b0c868d65a260095ff04dc65e443e9 /CST116-Ch11-Debugging
parentchange (diff)
downloadcst116-ch11-debugging-alexandra-apetroaei-5a9653ed640e7cc1e4eb85fd11ad0379296c7ccc.tar.xz
cst116-ch11-debugging-alexandra-apetroaei-5a9653ed640e7cc1e4eb85fd11ad0379296c7ccc.zip
finish
Diffstat (limited to 'CST116-Ch11-Debugging')
-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())
{