aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index 9f6082c..fe6e040 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -23,9 +23,14 @@
* Done; age now == 1
*
* 6) Why did the value in age change?
+* It was assigning 1 to age rather than comparing the value = vs ==
+*
* 7) Fix the problem and repeat Steps 2 � 5 to verify the
* problem was corrected.
+* Corrected and verified.
+*
* 8) Stop debugging.
+* done
*
* Debugging Exercise 2
*
@@ -66,7 +71,7 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- if (age = 1)
+ if (age == 1)
cout << "First Birthday" << endl;
else if (age >= 12 || age <= 19)
cout << "Teenager" << endl;