From 3578ba37fa83a13e0bfc33ff030348f46e2d9119 Mon Sep 17 00:00:00 2001 From: tafaar Date: Mon, 31 Oct 2022 21:05:10 -0700 Subject: fixed output --- CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp') diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp index d855410..0cc87f1 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp @@ -41,6 +41,8 @@ * 11) Build and execute your code until you have all errors * removed and all the output is correct. * +* Done +* * Debugging Exercise 2 * * 1) Replace the double slashes (\\) in the input file open statement @@ -132,6 +134,11 @@ int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[]) inFile >> name[counter] >> age[counter]; } + cout << setiosflags(ios::left) << setw(25) + << name[counter] << resetiosflags(ios::left) + << setw(4) << age[counter] << endl; + counter++; + return counter; } void WriteOutputFile(ofstream& outFile, char name[][MAX], int age[], int counter) -- cgit v1.2.3