aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-10-12 20:54:57 -0700
committerTrenton Stark <[email protected]>2022-10-12 20:54:57 -0700
commitecc366e1f67616d8d7c73fd7388b6b5cfc2279a3 (patch)
tree7f30189279240d261ab4e9a547401e4cbc429b6e /CST116-Ch7-Debugging
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-ch7-debugging-stark-ecc366e1f67616d8d7c73fd7388b6b5cfc2279a3.tar.xz
cst116-ch7-debugging-stark-ecc366e1f67616d8d7c73fd7388b6b5cfc2279a3.zip
completed exercise 1
Diffstat (limited to 'CST116-Ch7-Debugging')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index f64adfe..19d0109 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -13,6 +13,7 @@
* the value in age is what you typed in.
* 5) Step over the if statement.
* 6) Why did the value in age change?
+* By not using double equal signs, that was interpreted as changing age to 1
* 7) Fix the problem and repeat Steps 2 � 5 to verify the
* problem was corrected.
* 8) Stop debugging.
@@ -56,7 +57,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;