From e03795c9a4317baf36fcf29605e17cc3714d69d7 Mon Sep 17 00:00:00 2001 From: Evan Date: Wed, 19 Oct 2022 20:25:49 -0700 Subject: h --- CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'CST116-Ch9-Debugging') diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp index 27f4515..03465e4 100644 --- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp @@ -12,6 +12,7 @@ * 4) Add another watch using &age for the name. This will display * the address of age. * 5) Write down the address of age. +* * &age 0x000000736f6ff774 {0} int * * * 6) Step Into the code for the function GetAge. @@ -26,6 +27,9 @@ * 12) Step into until the flow returns to main. * 13) Step over one more time. * 14) Why didn't the value entered get transferred back to main? +* +* +* * 15) Stop debugging and fix the error. * 16) Run to Breakpoint 1. * 17) Step over the function call to GetAge. @@ -41,6 +45,9 @@ * 4) Step into one more time so that the current line is the * calculation. * 5) Why is age greyed out in your watch window? +* +* +* * 6) Stop debugging. * * Debugging Exercise 3 @@ -100,7 +107,7 @@ int GetAge() return age; } -//below age was years. trying to fix equation + int CalcDays(int age) { int days; @@ -113,4 +120,4 @@ void PrintResults(int days, int age) { cout << age << "! Boy are you old!\n"; cout << "Did you know that you are at least " << days << " days old?\n\n"; -} +} \ No newline at end of file -- cgit v1.2.3