diff options
| author | Andrei F <[email protected]> | 2022-11-01 22:27:23 -0700 |
|---|---|---|
| committer | Andrei F <[email protected]> | 2022-11-01 22:27:23 -0700 |
| commit | 6d01e7d58ed03fe23575e40573eb4d3c24d463f7 (patch) | |
| tree | 8fe60af4de872bf3db4f90e8a54e1039244e98ce | |
| parent | Initial commit (diff) | |
| download | archived-cst116-ch11-debugging-florea-6d01e7d58ed03fe23575e40573eb4d3c24d463f7.tar.xz archived-cst116-ch11-debugging-florea-6d01e7d58ed03fe23575e40573eb4d3c24d463f7.zip | |
Commiting
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | .vscode/settings.json | 5 | ||||
| -rw-r--r-- | CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp | 11 |
3 files changed, 16 insertions, 2 deletions
@@ -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()) { |