From 6d01e7d58ed03fe23575e40573eb4d3c24d463f7 Mon Sep 17 00:00:00 2001 From: Andrei F Date: Tue, 1 Nov 2022 22:27:23 -0700 Subject: Commiting --- .gitignore | 2 ++ .vscode/settings.json | 5 +++++ CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp | 11 +++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 9491a2f..6813020 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ # Mono auto generated files mono_crash.* +../a.out + # Build results [Dd]ebug/ [Dd]ebugPublic/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2eb4839 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "iomanip": "cpp" + } +} \ No newline at end of file diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp index 53830da..0e8fe34 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp @@ -1,4 +1,9 @@ /******************************************************************** + * Andrei Florea - CST 116 - Chapter 11 - Using input and output to work with files + * + * I went over the Chapter 11 presentation, but I could not find any questions to answer. + * + * * File: Chapter 11 Debug.cpp * * General Instructions: Complete each step before proceeding to the @@ -62,6 +67,8 @@ using std::setw; using std::ios; using std::ifstream; +using std::setiosflags; +using std::resetiosflags; using std::ofstream; const int EMPLOYEES = 20; @@ -81,9 +88,9 @@ int main() ifstream inFile; // Notice how this automatically opens the file - ofstream outFile("C:\\TEMP\\Chap_11_Report.txt"); + ofstream outFile("../Chap_11_Report.txt"); - inFile.open("C:\\TEMP\\Chap_11_data.txt"); + inFile.open("../Chap_11_data.txt"); if (inFile.is_open()) { -- cgit v1.2.3