diff options
| author | Trenton Stark <[email protected]> | 2022-10-14 23:29:02 -0700 |
|---|---|---|
| committer | Trenton Stark <[email protected]> | 2022-10-14 23:29:02 -0700 |
| commit | 2e0c0ce01ab1260380afa57052d4abe32543ab41 (patch) | |
| tree | 443ff3373ee1ea22cdd2e400876a5cff81b0ae76 /CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | |
| parent | added gitignore (diff) | |
| download | cst116-ch9-debugging-stark-2e0c0ce01ab1260380afa57052d4abe32543ab41.tar.xz cst116-ch9-debugging-stark-2e0c0ce01ab1260380afa57052d4abe32543ab41.zip | |
Completed exercise 1
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp index eff8980..7da0588 100644 --- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp @@ -16,11 +16,13 @@ * 7) The execution continues to the function header for GetAge.
* 8) Step into one more time.
* 9) Why did the address of age and value change?
+* The watch was now looking at the local variable "age" for the function GetAge()
* 10) Step over the cout and cin statements.
* 11) Verify the value entered is stored properly in age.
* 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?
+* Nothing is being done to the data returned from the function call
* 15) Stop debugging and fix the error.
* 16) Run to Breakpoint 1.
* 17) Step over the function call to GetAge.
@@ -77,7 +79,7 @@ int main() // Breakpoint 1
// Put breakpoint on the following line
- GetAge();
+ age = GetAge();
days = CalcDays(age);
// Breakpoint 2
|