diff options
| author | tafaar <[email protected]> | 2022-10-31 21:05:10 -0700 |
|---|---|---|
| committer | tafaar <[email protected]> | 2022-10-31 21:05:10 -0700 |
| commit | 3578ba37fa83a13e0bfc33ff030348f46e2d9119 (patch) | |
| tree | cd1f0e90c264a9d7e9f98ae4a6b0407af1176cc3 | |
| parent | added report (diff) | |
| download | cst116-ch11-debugging-hill-3578ba37fa83a13e0bfc33ff030348f46e2d9119.tar.xz cst116-ch11-debugging-hill-3578ba37fa83a13e0bfc33ff030348f46e2d9119.zip | |
fixed output
| -rw-r--r-- | CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp | 7 | ||||
| -rw-r--r-- | CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj | 1 | ||||
| -rw-r--r-- | CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters | 1 |
3 files changed, 9 insertions, 0 deletions
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) diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj index 50b9ca1..bf78376 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj @@ -131,6 +131,7 @@ </ItemGroup> <ItemGroup> <Text Include="..\..\..\..\Desktop\Chap11-MyData.txt" /> + <Text Include="..\..\..\..\Desktop\Chap_11_Report.txt" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters index c3f3010..a7c8759 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters @@ -21,5 +21,6 @@ </ItemGroup> <ItemGroup> <Text Include="..\..\..\..\Desktop\Chap11-MyData.txt" /> + <Text Include="..\..\..\..\Desktop\Chap_11_Report.txt" /> </ItemGroup> </Project>
\ No newline at end of file |