diff options
Diffstat (limited to 'CST116-Ch10-Debugging')
| -rw-r--r-- | CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index 72e48fd..06003ef 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -28,13 +28,10 @@ * 2) Change any literal containing a 5 to the constant SIZE.
* Notice the usefulness of the constant when changes need
* to be made to your code.
-*
* 3) Set a breakpoint at Breakpoint 4. Now on this breakpoint
* set the necessary condition so the loop breaks when x hits 8.
* (Hint: If you need help setting breakpoints based upon a
* condition refer to Chapter 8).
-*
-*
* 4) Run to Breakpoint 4.
* 5) Continue stepping into the remainder of the for loop until the
* flow returns back to main.
@@ -43,16 +40,18 @@ * 7) Stop debugging.
* 8) Disable all breakpoints.
* 9) Rebuild and execute the program and verify the results.
-*
* Debugging Exercise 3
-*
* 1) Just before the call to the PrintFunction in main, add an
* assignment statement to change the first element in the
* array varZ to -99.
* 2) Build and execute your code, verifying that the calculations
* are correct in relation to element 0 of varZ.
+*
+*
* 3) Add a line to assign the contents of the second element of
* varX to 99 in FunctionTwo.
+*
+*
* 4) Rebuild your program.
* 5 Obviously there is a problem. Remove the const from the
* function declaration and header for varX.
@@ -89,7 +88,7 @@ int main() {
int varX[10];
int varY[SIZE];
- int varZ[SIZE]; // Notice how we used the const here!
+ int varZ[99]; // Notice how we used the const here!
// Breakpoint 1
// Put breakpoint on the following line
|