summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMusa Ahmed <[email protected]>2022-11-02 18:32:48 -0700
committerMusa Ahmed <[email protected]>2022-11-02 18:32:48 -0700
commitf4980d134b7e2f5bab3b62c8567a737ba4c33f43 (patch)
tree3ae71fa978b04737dafc54cb7597b11fced3b800
parentb (diff)
downloadcst116-ch11-debugging-m005a-f4980d134b7e2f5bab3b62c8567a737ba4c33f43.tar.xz
cst116-ch11-debugging-m005a-f4980d134b7e2f5bab3b62c8567a737ba4c33f43.zip
Done
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging-Output-Ahmed.txt20
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp4
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj5
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters11
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Pseudocode-Ahmed.txt38
-rw-r--r--CST116-Ch11-Debugging/TEMPChap_11_Report.txt0
6 files changed, 74 insertions, 4 deletions
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Output-Ahmed.txt b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Output-Ahmed.txt
new file mode 100644
index 0000000..281a86e
--- /dev/null
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Output-Ahmed.txt
@@ -0,0 +1,20 @@
+John 19
+Molly 23
+Tim 48
+Keil 42
+Trinh 21
+Musa 18
+Anthony 25
+Kevin 27
+Cheryl 32
+Kim 16
+Dave 25
+Will 34
+
+
+ ** Total Records: 12 **
+ The End
+
+C:\Users\macho\Source\Repos\cst116-ch11-debugging-M005A\x64\Debug\CST116-Ch11-Debugging.exe (process 33300) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . . \ 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..caf7903 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
@@ -81,9 +81,9 @@ int main()
ifstream inFile;
// Notice how this automatically opens the file
- ofstream outFile("C:\\TEMP\\Chap_11_Report.txt");
+ ofstream outFile("C:\\TEMP\\CST116-Ch11-Report-Ahmed.txt");
- inFile.open("C:\\TEMP\\Chap_11_data.txt");
+ inFile.open("C:\\TEMP\\CST116-Ch11-data-Ahmed.txt");
if (inFile.is_open())
{
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj
index cd94bf4..a18c0e7 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj
@@ -130,7 +130,10 @@
<ClCompile Include="CST116-Ch11-Debugging.cpp" />
</ItemGroup>
<ItemGroup>
- <Text Include="..\..\..\..\OneDrive\Desktop\Chap_11_data.txt" />
+ <Text Include="..\..\..\..\..\..\TEMP\CST116-Ch11-data-Ahmed.txt" />
+ <Text Include="..\..\..\..\..\..\TEMP\CST116-Ch11-Report-Ahmed.txt" />
+ <Text Include="CST116-Ch11-Debugging-Output-Ahmed.txt" />
+ <Text Include="CST116-Ch11-Pseudocode-Ahmed.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 2e5ad78..778c47c 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters
@@ -20,7 +20,16 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
- <Text Include="..\..\..\..\OneDrive\Desktop\Chap_11_data.txt">
+ <Text Include="..\..\..\..\..\..\TEMP\CST116-Ch11-data-Ahmed.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="..\..\..\..\..\..\TEMP\CST116-Ch11-Report-Ahmed.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="CST116-Ch11-Debugging-Output-Ahmed.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="CST116-Ch11-Pseudocode-Ahmed.txt">
<Filter>Source Files</Filter>
</Text>
</ItemGroup>
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Pseudocode-Ahmed.txt b/CST116-Ch11-Debugging/CST116-Ch11-Pseudocode-Ahmed.txt
new file mode 100644
index 0000000..7cd7547
--- /dev/null
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Pseudocode-Ahmed.txt
@@ -0,0 +1,38 @@
+Iniitialize a constant Int EMPLOYEES to be equal to 20
+Initialize a constant int MAX to be equal to 21
+
+Initialize a chaaracter 2D-array name to have rows of EMPLOYEES and columns of MAX
+Initialize an integer array name to have a lenght of EMPLOYEES
+
+set the desired output file using ofstream outFile to be C:\\TEMP\\CST116-Ch11-Report-Ahmed.txt
+Open the fire to read from at C:\\TEMP\\CST116-Ch11-data-Ahmed.txt
+
+If the file is open
+ store the data from the file
+ close the input file
+ if the output file is open
+ write the data we just stored to this file
+ close the output file
+
+ otherwise
+ tell the user there was trouble opening the file
+otherwise
+ tell the user there was trouble opening the file
+
+definition for readData
+ Initialize a counter to be 0
+ prime the read from the file by inputting data to the 0th place of both age and name
+
+ while we are not at the end of the file
+ print out the names and ages at the index of counter
+ increment counter
+ again input new data into the naem and age array at the new index of counter
+
+definition of writeoutputfile
+ write " Here is the Output File" to the output file
+ enter a for loop which iterates until r is no longer less than coutner, starting from 0
+ output the data of name and age at the index of r
+
+
+definition of printotalsummary
+ print out the total amount of records that we have, both to the output file and to the screen \ No newline at end of file
diff --git a/CST116-Ch11-Debugging/TEMPChap_11_Report.txt b/CST116-Ch11-Debugging/TEMPChap_11_Report.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/CST116-Ch11-Debugging/TEMPChap_11_Report.txt