From 5a9653ed640e7cc1e4eb85fd11ad0379296c7ccc Mon Sep 17 00:00:00 2001 From: alexandra-apetroaei Date: Wed, 2 Nov 2022 22:26:59 -0800 Subject: finish --- CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp | 7 +++++-- TEMP/psuedocode.txt | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 TEMP/psuedocode.txt 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()) { diff --git a/TEMP/psuedocode.txt b/TEMP/psuedocode.txt new file mode 100644 index 0000000..2983b7e --- /dev/null +++ b/TEMP/psuedocode.txt @@ -0,0 +1,6 @@ +Read in variable employees and assign the value 20 +Read in variable empoyee name +Read in variable age + +Make a file and input it to the program +Display total records to the user \ No newline at end of file -- cgit v1.2.3