summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei F <[email protected]>2022-11-01 22:27:23 -0700
committerAndrei F <[email protected]>2022-11-01 22:27:23 -0700
commit6d01e7d58ed03fe23575e40573eb4d3c24d463f7 (patch)
tree8fe60af4de872bf3db4f90e8a54e1039244e98ce
parentInitial commit (diff)
downloadarchived-cst116-ch11-debugging-florea-6d01e7d58ed03fe23575e40573eb4d3c24d463f7.tar.xz
archived-cst116-ch11-debugging-florea-6d01e7d58ed03fe23575e40573eb4d3c24d463f7.zip
Commiting
-rw-r--r--.gitignore2
-rw-r--r--.vscode/settings.json5
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp11
3 files changed, 16 insertions, 2 deletions
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())
{