diff options
| author | alexandra-apetroaei <andra@MSI> | 2022-11-02 22:26:59 -0800 |
|---|---|---|
| committer | alexandra-apetroaei <andra@MSI> | 2022-11-02 22:26:59 -0800 |
| commit | 5a9653ed640e7cc1e4eb85fd11ad0379296c7ccc (patch) | |
| tree | fff1a9c5e1b0c868d65a260095ff04dc65e443e9 /CST116-Ch11-Debugging | |
| parent | change (diff) | |
| download | cst116-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.cpp | 7 |
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()) { |