aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprestonderek <[email protected]>2022-10-21 10:44:20 -0700
committerprestonderek <[email protected]>2022-10-21 10:44:20 -0700
commitf3c33a48816677824d1938c4c110100f04813dac (patch)
tree1e1ee477b3d1a62b5fb40801087a3fe493f9874b
parentremoved const identifier from varX in the declaration and header (diff)
downloadcst116-ch10-debugging-prestonderek-f3c33a48816677824d1938c4c110100f04813dac.tar.xz
cst116-ch10-debugging-prestonderek-f3c33a48816677824d1938c4c110100f04813dac.zip
Finished exercise three and watched the change of the ASCII when changing the value in the watch windowHEADmain
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
index ee63d02..93a079b 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
@@ -99,7 +99,6 @@ int main()
// Breakpoint 3
// Put breakpoint on the following line
- varX[1] = 99;
FunctionTwo(varX, varY, varZ);
varZ[0] = -99;
@@ -136,6 +135,7 @@ void FunctionOne(int varX[], int varY[])
}
void FunctionTwo(int varX[], const int varY[], int varZ[])
{
+ varX[1] = 99;
for (int x = 0; x < SIZE; x++) // Notice the const SIZE here
varZ[x] = varX[x] + varY[x];
}