aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch10-Debugging
diff options
context:
space:
mode:
authorJoseph Williams <[email protected]>2022-10-20 14:38:56 -0700
committerJoseph Williams <[email protected]>2022-10-20 14:38:56 -0700
commit55fbb55fd2852027c53c661c79ffb2b2db1f09c9 (patch)
treeee68ff788b5b0a7de27395f46182599b6af0665b /CST116-Ch10-Debugging
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-ch10-debugging-allthenamesaretaken3141-55fbb55fd2852027c53c661c79ffb2b2db1f09c9.tar.xz
cst116-ch10-debugging-allthenamesaretaken3141-55fbb55fd2852027c53c661c79ffb2b2db1f09c9.zip
finished.HEADmain
Diffstat (limited to 'CST116-Ch10-Debugging')
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/3c4f46b6-4db1-46f6-8968-44f40e7e7bc2.vsidxbin0 -> 10523 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/47ff5d24-db43-43f8-ac19-aa4b2337c7fa.vsidxbin0 -> 1389 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/908f5140-beb3-4a91-b4ae-7b4b771305b3.vsidxbin0 -> 2612 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/e3246281-8a98-4351-a620-70e5ea86c37a.vsidxbin0 -> 14782 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/read.lock0
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/.suobin0 -> 36352 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.dbbin0 -> 16498688 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-shmbin0 -> 32768 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-walbin0 -> 1388536 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/a468b4f505a81d66/CST116-CH10-DEBUGGING-WILLIAMS.ipchbin0 -> 40501248 bytes
-rw-r--r--CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/e9183a525301575f/CST116-CH10-DEBUGGING.ipchbin0 -> 40501248 bytes
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Pseudocode.txt28
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Run.txt34
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams.cpp (renamed from CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp)298
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj6
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj.filters10
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.command.1.tlogbin0 -> 2054 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.read.1.tlogbin0 -> 20426 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.write.1.tlogbin0 -> 1020 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CST116-Ch10-Debugging.lastbuildstate2
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.command.1.tlogbin0 -> 1928 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.read.1.tlogbin0 -> 3992 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.write.1.tlogbin0 -> 1086 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging-Williams.objbin0 -> 154357 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exebin0 -> 95744 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe.recipe11
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.ilkbin0 -> 847560 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.log2
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.objbin0 -> 154324 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.pdbbin0 -> 1470464 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.vcxproj.FileListAbsolute.txt1
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/vc143.idbbin0 -> 281600 bytes
-rw-r--r--CST116-Ch10-Debugging/x64/Debug/vc143.pdbbin0 -> 471040 bytes
33 files changed, 242 insertions, 150 deletions
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/3c4f46b6-4db1-46f6-8968-44f40e7e7bc2.vsidx b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/3c4f46b6-4db1-46f6-8968-44f40e7e7bc2.vsidx
new file mode 100644
index 0000000..5245591
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/3c4f46b6-4db1-46f6-8968-44f40e7e7bc2.vsidx
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/47ff5d24-db43-43f8-ac19-aa4b2337c7fa.vsidx b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/47ff5d24-db43-43f8-ac19-aa4b2337c7fa.vsidx
new file mode 100644
index 0000000..efd5b1b
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/47ff5d24-db43-43f8-ac19-aa4b2337c7fa.vsidx
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/908f5140-beb3-4a91-b4ae-7b4b771305b3.vsidx b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/908f5140-beb3-4a91-b4ae-7b4b771305b3.vsidx
new file mode 100644
index 0000000..c435e66
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/908f5140-beb3-4a91-b4ae-7b4b771305b3.vsidx
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/e3246281-8a98-4351-a620-70e5ea86c37a.vsidx b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/e3246281-8a98-4351-a620-70e5ea86c37a.vsidx
new file mode 100644
index 0000000..26b57eb
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/e3246281-8a98-4351-a620-70e5ea86c37a.vsidx
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/read.lock b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/FileContentIndex/read.lock
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/.suo b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/.suo
new file mode 100644
index 0000000..8f94258
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/.suo
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db
new file mode 100644
index 0000000..42f31fc
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-shm b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-shm
new file mode 100644
index 0000000..f6bec84
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-shm
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-wal b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-wal
new file mode 100644
index 0000000..bc068dc
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/Browse.VC.db-wal
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/a468b4f505a81d66/CST116-CH10-DEBUGGING-WILLIAMS.ipch b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/a468b4f505a81d66/CST116-CH10-DEBUGGING-WILLIAMS.ipch
new file mode 100644
index 0000000..d82a99d
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/a468b4f505a81d66/CST116-CH10-DEBUGGING-WILLIAMS.ipch
Binary files differ
diff --git a/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/e9183a525301575f/CST116-CH10-DEBUGGING.ipch b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/e9183a525301575f/CST116-CH10-DEBUGGING.ipch
new file mode 100644
index 0000000..b8d8406
--- /dev/null
+++ b/CST116-Ch10-Debugging/.vs/CST116-Ch10-Debugging/v17/ipch/AutoPCH/e9183a525301575f/CST116-CH10-DEBUGGING.ipch
Binary files differ
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Pseudocode.txt b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Pseudocode.txt
new file mode 100644
index 0000000..5ee897c
--- /dev/null
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Pseudocode.txt
@@ -0,0 +1,28 @@
+program start:
+
+create a constant for SIZE and set it to 10
+create int arrays of size SIZE for varX, varY, and varZ
+
+run GetAndDisplayWelcomeInfo
+run FunctionOne
+
+run FunctionTwo
+set varZ[SIZE-1] to -99
+run PrintFunction
+
+program end
+
+
+GetandDisplayWelcomeInfo:
+create an array NAME containing 2 chars of size 20
+get the user's first and last name and store them in NAME
+print a welcome message addressing the user by name
+
+FunctionOne:
+for each value in varX[i], set varY[i] to varX[i] + 100
+
+FunctionTwo:
+for each value in varX[i], set varZ[i] to varX[i] + varY[i]
+
+PrintFunction(varX,varY,varZ):
+print varX, varY, and varZ in a simple table \ No newline at end of file
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Run.txt b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Run.txt
new file mode 100644
index 0000000..9a19982
--- /dev/null
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Run.txt
@@ -0,0 +1,34 @@
+Please enter your first name: Tim
+
+Please enter your last name: Timmyson
+
+
+ Welcome Tim Timmyson!
+ Hope all is well
+
+ x y z
+
+ 0 100 100
+ 1 101 102
+ 2 102 104
+ 3 103 106
+ 4 104 108
+
+
+Also I broke your code, do better next time lol:
+
+Please enter your first name: Glornax
+
+Please enter your last name: the Destroyer
+
+
+ Welcome Glornax the!
+ Hope all is well
+
+ x y z
+
+ 0 100 100
+ 1 101 102
+ 2 102 104
+ 3 103 106
+ 4 104 108 \ No newline at end of file
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams.cpp
index 1e3d58b..6b34e7b 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams.cpp
@@ -1,148 +1,150 @@
-/********************************************************************
-* File: CST116-Ch10-Debugging.cpp
-*
-* General Instructions: Complete each step before proceeding to the
-* next.
-*
-* Debugging Exercise 1
-*
-* 1) Build and run the program.
-* 2) Examine the code and the output and notice the use of
-* parallel arrays.
-* 3) Insert breakpoints at Breakpoint 1, Breakpoint 2, and Breakpoint
-* 3.
-* 4) Run to Breakpoint 1.
-* 5) Place a watch on varX, varY and varZ. Click on the '+' in the
-* watch window to see the individual elements associated with each
-* of the arrays.
-* 6) Continue running your program to Breakpoint 2.
-* 7) Add a watch on the array called name. Again, click on the '+'
-* symbol. Notice how a multidimensional array is shown in the
-* debugger, the null terminating characters location, and how a
-* character is represented within each element of the array.
-* 8) Continue running the program to Breakpoint 3.
-* 9) Notice the contents of varX and varY now that you are back in the
-* main function.
-* 10) Clear all the breakpoints.
-* 11) Stop debugging.
-*
-* Debugging Exercise 2
-*
-* 1) Change the constant SIZE from 5 to 10.
-* 2) Change any literal containing a 5 to the constant SIZE.
-* Notice the usefulness of the constant when changes need
-* to be made to your code.
-* 3) Set a breakpoint at Breakpoint 4. Now on this breakpoint
-* set the necessary condition so the loop breaks when x hits 8.
-* (Hint: If you need help setting breakpoints based upon a
-* condition refer to Chapter 8).
-* 4) Run to Breakpoint 4.
-* 5) Continue stepping into the remainder of the for loop until the
-* flow returns back to main.
-* 6) Make sure your Watch window is visible and notice the contents
-* of varY and varZ now that you are back in main.
-* 7) Stop debugging.
-* 8) Disable all breakpoints.
-* 9) Rebuild and execute the program and verify the results.
-*
-* Debugging Exercise 3
-*
-* 1) Just before the call to the PrintFunction in main, add an
-* assignment statement to change the first element in the
-* array varZ to -99.
-* 2) Build and execute your code, verifying that the calculations
-* are correct in relation to element 0 of varZ.
-* 3) Add a line to assign the contents of the second element of
-* varX to 99 in FunctionTwo.
-* 4) Rebuild your program.
-* 5 Obviously there is a problem. Remove the const from the
-* function declaration and header for varX.
-* 5) Now you should be able to build and execute your code. Do it.
-* 6) Set a breakpoint on Breakpoint 2.
-* 7) Re-enable Breakpoint 2.
-* 8) Run to Breakpoint 2 and make sure you have a watch on the
-* variable name.
-* 9) Click on the '+'. Once you see all the elements
-* within the array, change the 'Value' (in the Value field)
-* for the first element of the array directly within the Watch
-* window to the character 'Z'. Notice how the value is updated
-* by displaying the new ASCII value too.
-* 10) Stop debugging.
-* 11) Disable all breakpoints.
-*
-********************************************************************/
-#include <iostream>
-#include <iomanip>
-using std::cin;
-using std::cout;
-using std::endl;
-using std::setw;
-
-void GetAndDisplayWelcomeInfo();
-void FunctionOne(int varX[], int varY[]);
-void FunctionTwo(const int varX[], const int varY[], int varZ[]);
-void PrintFunction(const int varX[], const int varY[],
- const int varZ[]);
-
-const int SIZE = 5;
-
-int main()
-{
- int varX[5];
- int varY[SIZE];
- int varZ[SIZE]; // Notice how we used the const here!
-
- // Breakpoint 1
- // Put breakpoint on the following line
- GetAndDisplayWelcomeInfo();
- FunctionOne(varX, varY);
-
- // Breakpoint 3
- // Put breakpoint on the following line
- FunctionTwo(varX, varY, varZ);
- PrintFunction(varX, varY, varZ);
-
- return 0;
-}
-void GetAndDisplayWelcomeInfo()
-{
- char name[2][20]; // First name in row 0, last name in row 1
-
- cout << "Please enter your first name: ";
- cin >> name[0];
-
- cout << "\nPlease enter your last name: ";
- cin >> name[1];
-
- // Breakpoint 2
- // Put breakpoint on the following line
- cout << "\n\n\tWelcome " << name[0] << " " << name[1]
- << "!\n\t Hope all is well \n\n";
-}
-void FunctionOne(int varX[], int varY[])
-{
- for (int x = 0; x < SIZE; x++) // NOTICE '<' NOT <=
- // Breakpoint 4
- // Put breakpoint on the following line
- varX[x] = x;
-
- for (int x = 0; x < 5; x++)
- varY[x] = x + 100;
-}
-void FunctionTwo(const int varX[], const int varY[], int varZ[])
-{
- for (int x = 0; x < SIZE; x++) // Notice the const SIZE here
- varZ[x] = varX[x] + varY[x];
-}
-void PrintFunction(const int varX[20], const int varY[20],
- const int varZ[20])
-{
- int x;
-
- cout << " \t x \t y \t z\n\n";
-
- for (x = 0; x < SIZE; x++)
- cout << "\t" << setw(3) << varX[x]
- << "\t " << varY[x]
- << "\t " << varZ[x] << endl;
-}
+/********************************************************************
+* File: CST116-Ch10-Debugging.cpp
+*
+* General Instructions: Complete each step before proceeding to the
+* next.
+*
+* Debugging Exercise 1
+*
+* 1) Build and run the program.
+* 2) Examine the code and the output and notice the use of
+* parallel arrays.
+* 3) Insert breakpoints at Breakpoint 1, Breakpoint 2, and Breakpoint
+* 3.
+* 4) Run to Breakpoint 1.
+* 5) Place a watch on varX, varY and varZ. Click on the '+' in the
+* watch window to see the individual elements associated with each
+* of the arrays.
+* 6) Continue running your program to Breakpoint 2.
+* 7) Add a watch on the array called name. Again, click on the '+'
+* symbol. Notice how a multidimensional array is shown in the
+* debugger, the null terminating characters location, and how a
+* character is represented within each element of the array.
+* 8) Continue running the program to Breakpoint 3.
+* 9) Notice the contents of varX and varY now that you are back in the
+* main function.
+* 10) Clear all the breakpoints.
+* 11) Stop debugging.
+*
+* Debugging Exercise 2
+*
+* 1) Change the constant SIZE from 5 to 10.
+* 2) Change any literal containing a 5 to the constant SIZE.
+* Notice the usefulness of the constant when changes need
+* to be made to your code.
+* 3) Set a breakpoint at Breakpoint 4. Now on this breakpoint
+* set the necessary condition so the loop breaks when x hits 8.
+* (Hint: If you need help setting breakpoints based upon a
+* condition refer to Chapter 8).
+* 4) Run to Breakpoint 4.
+* 5) Continue stepping into the remainder of the for loop until the
+* flow returns back to main.
+* 6) Make sure your Watch window is visible and notice the contents
+* of varY and varZ now that you are back in main.
+* 7) Stop debugging.
+* 8) Disable all breakpoints.
+* 9) Rebuild and execute the program and verify the results.
+*
+* Debugging Exercise 3
+*
+* 1) Just before the call to the PrintFunction in main, add an
+* assignment statement to change the first element in the
+* array varZ to -99.
+* 2) Build and execute your code, verifying that the calculations
+* are correct in relation to element 0 of varZ.
+* 3) Add a line to assign the contents of the second element of
+* varX to 99 in FunctionTwo.
+* 4) Rebuild your program.
+* 5 Obviously there is a problem. Remove the const from the
+* function declaration and header for varX.
+* 5) Now you should be able to build and execute your code. Do it.
+* 6) Set a breakpoint on Breakpoint 2.
+* 7) Re-enable Breakpoint 2.
+* 8) Run to Breakpoint 2 and make sure you have a watch on the
+* variable name.
+* 9) Click on the '+'. Once you see all the elements
+* within the array, change the 'Value' (in the Value field)
+* for the first element of the array directly within the Watch
+* window to the character 'Z'. Notice how the value is updated
+* by displaying the new ASCII value too.
+* 10) Stop debugging.
+* 11) Disable all breakpoints.
+*
+********************************************************************/
+#include <iostream>
+#include <iomanip>
+using std::cin;
+using std::cout;
+using std::endl;
+using std::setw;
+
+void GetAndDisplayWelcomeInfo();
+void FunctionOne(int varX[], int varY[]);
+void FunctionTwo(int varX[], const int varY[], int varZ[]);
+void PrintFunction(const int varX[], const int varY[],
+ const int varZ[]);
+
+const int SIZE = 10;
+
+int main()
+{
+ int varX[SIZE];
+ int varY[SIZE];
+ int varZ[SIZE]; // Notice how we used the const here!
+
+ // Breakpoint 1
+ // Put breakpoint on the following line
+ GetAndDisplayWelcomeInfo();
+ FunctionOne(varX, varY);
+
+ // Breakpoint 3
+ // Put breakpoint on the following line
+ FunctionTwo(varX, varY, varZ);
+ varZ[SIZE-1] = -99;
+ PrintFunction(varX, varY, varZ);
+
+ return 0;
+}
+void GetAndDisplayWelcomeInfo()
+{
+ char name[2][20]; // First name in row 0, last name in row 1
+
+ cout << "Please enter your first name: ";
+ cin >> name[0];
+
+ cout << "\nPlease enter your last name: ";
+ cin >> name[1];
+
+ // Breakpoint 2
+ // Put breakpoint on the following line
+ cout << "\n\n\tWelcome " << name[0] << " " << name[1]
+ << "!\n\t Hope all is well \n\n";
+}
+void FunctionOne(int varX[], int varY[])
+{
+ for (int x = 0; x < SIZE; x++) // NOTICE '<' NOT <=
+ // Breakpoint 4
+ // Put breakpoint on the following line
+ varX[x] = x;
+
+ for (int x = 0; x < SIZE; x++)
+ varY[x] = x + 100;
+}
+void FunctionTwo(int varX[], const int varY[], int varZ[])
+{
+ for (int x = 0; x < SIZE; x++) // Notice the const SIZE here
+ varZ[x] = varX[x] + varY[x];
+ varX[1] = 99;
+}
+void PrintFunction(const int varX[20], const int varY[20],
+ const int varZ[20])
+{
+ int x;
+
+ cout << " \t x \t y \t z\n\n";
+
+ for (x = 0; x < SIZE; x++)
+ cout << "\t" << setw(3) << varX[x]
+ << "\t " << varY[x]
+ << "\t " << varZ[x] << endl;
+}
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj
index 35e9b1e..4da25af 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj
@@ -127,7 +127,11 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="CST116-Ch10-Debugging.cpp" />
+ <ClCompile Include="CST116-Ch10-Debugging-Williams.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="CST116-Ch10-Debugging-Williams-Pseudocode.txt" />
+ <Text Include="CST116-Ch10-Debugging-Williams-Run.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj.filters b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj.filters
index dc0ce4a..149cfa9 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj.filters
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.vcxproj.filters
@@ -15,8 +15,16 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="CST116-Ch10-Debugging.cpp">
+ <ClCompile Include="CST116-Ch10-Debugging-Williams.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Text Include="CST116-Ch10-Debugging-Williams-Run.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="CST116-Ch10-Debugging-Williams-Pseudocode.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.command.1.tlog b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.command.1.tlog
new file mode 100644
index 0000000..0599ba6
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.command.1.tlog
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.read.1.tlog b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.read.1.tlog
new file mode 100644
index 0000000..4be6c2e
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.read.1.tlog
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.write.1.tlog b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.write.1.tlog
new file mode 100644
index 0000000..7b47a19
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CL.write.1.tlog
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CST116-Ch10-Debugging.lastbuildstate b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CST116-Ch10-Debugging.lastbuildstate
new file mode 100644
index 0000000..9b5b9fb
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/CST116-Ch10-Debugging.lastbuildstate
@@ -0,0 +1,2 @@
+PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0:
+Debug|x64|C:\Users\hey-t\Source\Repos\cst116-ch10-debugging-AllTheNamesAreTaken3141\CST116-Ch10-Debugging\|
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.command.1.tlog b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.command.1.tlog
new file mode 100644
index 0000000..2644aa0
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.command.1.tlog
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.read.1.tlog b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.read.1.tlog
new file mode 100644
index 0000000..5cf4788
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.read.1.tlog
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.write.1.tlog b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.write.1.tlog
new file mode 100644
index 0000000..ee3fcfc
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-C.25de9f3e.tlog/link.write.1.tlog
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging-Williams.obj b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging-Williams.obj
new file mode 100644
index 0000000..6ebb2c1
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging-Williams.obj
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe
new file mode 100644
index 0000000..3e85b2d
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe.recipe b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe.recipe
new file mode 100644
index 0000000..5a27fba
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.exe.recipe
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+ <ProjectOutputs>
+ <ProjectOutput>
+ <FullPath>C:\Users\hey-t\Source\Repos\cst116-ch10-debugging-AllTheNamesAreTaken3141\CST116-Ch10-Debugging\x64\Debug\CST116-Ch10-Debugging.exe</FullPath>
+ </ProjectOutput>
+ </ProjectOutputs>
+ <ContentFiles />
+ <SatelliteDlls />
+ <NonRecipeFileRefs />
+</Project> \ No newline at end of file
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.ilk b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.ilk
new file mode 100644
index 0000000..65dc438
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.ilk
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.log b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.log
new file mode 100644
index 0000000..b0a0b45
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.log
@@ -0,0 +1,2 @@
+ CST116-Ch10-Debugging-Williams.cpp
+ CST116-Ch10-Debugging.vcxproj -> C:\Users\hey-t\Source\Repos\cst116-ch10-debugging-AllTheNamesAreTaken3141\CST116-Ch10-Debugging\x64\Debug\CST116-Ch10-Debugging.exe
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.obj b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.obj
new file mode 100644
index 0000000..4f58dba
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.obj
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.pdb b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.pdb
new file mode 100644
index 0000000..f7f5f5d
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.pdb
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.vcxproj.FileListAbsolute.txt b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.vcxproj.FileListAbsolute.txt
new file mode 100644
index 0000000..c2cf464
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/CST116-Ch10-Debugging.vcxproj.FileListAbsolute.txt
@@ -0,0 +1 @@
+C:\Users\hey-t\Source\Repos\cst116-ch10-debugging-AllTheNamesAreTaken3141\CST116-Ch10-Debugging\x64\Debug\CST116-Ch10-Debugging.exe
diff --git a/CST116-Ch10-Debugging/x64/Debug/vc143.idb b/CST116-Ch10-Debugging/x64/Debug/vc143.idb
new file mode 100644
index 0000000..45a09a2
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/vc143.idb
Binary files differ
diff --git a/CST116-Ch10-Debugging/x64/Debug/vc143.pdb b/CST116-Ch10-Debugging/x64/Debug/vc143.pdb
new file mode 100644
index 0000000..2ac0988
--- /dev/null
+++ b/CST116-Ch10-Debugging/x64/Debug/vc143.pdb
Binary files differ