From 0e47294ac6bc5b675fe7d3a4345e8c30eebfce09 Mon Sep 17 00:00:00 2001 From: Morgan Cyrus Date: Sun, 30 Oct 2022 11:28:22 -0700 Subject: varX[1] = 99; --- CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index d02ceb3..4c03c8c 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -90,14 +90,22 @@ * 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. +* done * * 2) Build and execute your code, verifying that the calculations * are correct in relation to element 0 of varZ. +* done +* * 3) Add a line to assign the contents of the second element of * varX to 99 in FunctionTwo. +* done +* * 4) Rebuild your program. +* done +* * 5 Obviously there is a problem. Remove the const from the * function declaration and header for varX. +* * 5) Now you should be able to build and execute your code. Do it. * 6) Set a breakpoint on Breakpoint 2. * 7) Re-enable Breakpoint 2. @@ -143,6 +151,7 @@ int main() FunctionTwo(varX, varY, varZ); varZ[0] = -99; + varX[1] = 99; PrintFunction(varX, varY, varZ); return 0; -- cgit v1.2.3