aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp
diff options
context:
space:
mode:
authorTheOtherTonyStark <[email protected]>2022-10-16 14:08:34 -0700
committerTheOtherTonyStark <[email protected]>2022-10-16 14:08:34 -0700
commit2b9c6225a968533d5da195f72e0854cb97f79dcb (patch)
treefeeebfb1faa10a77f74738fcf1bd82b8f10e9bd6 /CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp
parentThird Commit (diff)
downloadcst116-ch9-debugging-theothertonystark-2b9c6225a968533d5da195f72e0854cb97f79dcb.tar.xz
cst116-ch9-debugging-theothertonystark-2b9c6225a968533d5da195f72e0854cb97f79dcb.zip
Fourth Commit
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp')
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp
index 425444a..ddabfe4 100644
--- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Chambers.cpp
@@ -51,6 +51,7 @@
* 4) Step into the PrintResults function.
* 5) Age is 7300? Not even Ralph is that old.
* 6) Why did the values for both variables change?
+* The variables changed because we changed the order in which they were entered.
* 7) Stop debugging and fix the error.
*
* Debugging Exercise 4
@@ -106,7 +107,7 @@ int CalcDays(int years)
return days;
}
-void PrintResults(int days, int age)
+void PrintResults(int age, int days)
{
cout << age << "! Boy are you old!\n";
cout << "Did you know that you are at least " << days << " days old?\n\n";