diff options
| author | Evan <[email protected]> | 2022-10-19 20:25:49 -0700 |
|---|---|---|
| committer | Evan <[email protected]> | 2022-10-19 20:25:49 -0700 |
| commit | e03795c9a4317baf36fcf29605e17cc3714d69d7 (patch) | |
| tree | 5c6046ae2cdd44e73b6630cb2d134ca3fc901025 /CST116-Ch9-Debugging | |
| parent | g (diff) | |
| download | cst116-ch9-debugging-evanmihm-main.tar.xz cst116-ch9-debugging-evanmihm-main.zip | |
Diffstat (limited to 'CST116-Ch9-Debugging')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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 |