aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging
diff options
context:
space:
mode:
author[email protected] <[email protected]>2022-10-12 14:13:12 -0700
committer[email protected] <[email protected]>2022-10-12 14:13:12 -0700
commit34f87c0c20f53facad8374e1aabee17a3ef3bf18 (patch)
treeae308914fbf8d5fb40788d0ac49219e29a4a492a /CST116-Ch7-Debugging
parentTest 2 (diff)
downloadcst116-ch7-debugging-smith-benjamin-34f87c0c20f53facad8374e1aabee17a3ef3bf18.tar.xz
cst116-ch7-debugging-smith-benjamin-34f87c0c20f53facad8374e1aabee17a3ef3bf18.zip
Final Test
Diffstat (limited to 'CST116-Ch7-Debugging')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp5
-rw-r--r--CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exebin68608 -> 68608 bytes
-rw-r--r--CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilkbin706312 -> 766056 bytes
-rw-r--r--CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.objbin76311 -> 76313 bytes
-rw-r--r--CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdbbin1470464 -> 1609728 bytes
-rw-r--r--CST116-Ch7-Debugging/x64/Debug/vc143.idbbin166912 -> 166912 bytes
-rw-r--r--CST116-Ch7-Debugging/x64/Debug/vc143.pdbbin405504 -> 405504 bytes
7 files changed, 3 insertions, 2 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index b97eb32..52619f4 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -38,6 +38,7 @@
* 1) Run the program without debugging.
* 2) When prompted, enter the value of 10 for your age.
* 3) Why does the program print both "Child" and "Adult"?
+* The else has a semicolon, thus not running the next line IN the else, but rather running it on its own no matter what
* 4) Re-run the program this time with debugging and run to
* Breakpoint 2.
* 5) Why is the action with the else executing?
@@ -58,7 +59,7 @@ int main()
// Put a breakpoint on the following line
if (age == 1)
cout << "First Birthday" << endl;
- else if (age >= 12 || age <= 19)
+ else if (age >= 12 && age <= 19)
cout << "Teenager" << endl;
else if (age < 12)
cout << "Child" << endl;
@@ -66,7 +67,7 @@ int main()
cout << "Senior" << endl;
// Breakpoint 2
// Put a breakpoint on the following line
- else;
+ else
cout << "Adult" << endl;
return 0;
diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe
index afab05c..223dd3a 100644
--- a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe
+++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe
Binary files differ
diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk
index cfa1815..2b85ffe 100644
--- a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk
+++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk
Binary files differ
diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj
index 755e060..71b32d8 100644
--- a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj
+++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj
Binary files differ
diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb
index ea61d89..8023b84 100644
--- a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb
+++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb
Binary files differ
diff --git a/CST116-Ch7-Debugging/x64/Debug/vc143.idb b/CST116-Ch7-Debugging/x64/Debug/vc143.idb
index d4e4ec2..181d232 100644
--- a/CST116-Ch7-Debugging/x64/Debug/vc143.idb
+++ b/CST116-Ch7-Debugging/x64/Debug/vc143.idb
Binary files differ
diff --git a/CST116-Ch7-Debugging/x64/Debug/vc143.pdb b/CST116-Ch7-Debugging/x64/Debug/vc143.pdb
index adeedf7..f9329d3 100644
--- a/CST116-Ch7-Debugging/x64/Debug/vc143.pdb
+++ b/CST116-Ch7-Debugging/x64/Debug/vc143.pdb
Binary files differ