aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortafaar <[email protected]>2022-10-25 12:50:00 -0700
committertafaar <[email protected]>2022-10-25 12:50:00 -0700
commit262f2f960a54ae161cf6a369a92a59b930dac458 (patch)
tree4eb281e99a3875e3661aa78b95b86d1a5819e128
parentdid 3.2 (diff)
downloadcst116-ch10-debugging-hill-262f2f960a54ae161cf6a369a92a59b930dac458.tar.xz
cst116-ch10-debugging-hill-262f2f960a54ae161cf6a369a92a59b930dac458.zip
Did 3.3
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
index 3a50611..b9d106e 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
@@ -68,6 +68,9 @@
*
* 3) Add a line to assign the contents of the second element of
* varX to 99 in FunctionTwo.
+*
+* Done
+*
* 4) Rebuild your program.
* 5 Obviously there is a problem. Remove the const from the
* function declaration and header for varX.
@@ -148,6 +151,8 @@ void FunctionTwo(const int varX[], const int varY[], int varZ[])
{
for (int x = 0; x < SIZE; x++) // Notice the const SIZE here
varZ[x] = varX[x] + varY[x];
+
+ varZ[1] = 99;
}
void PrintFunction(const int varX[20], const int varY[20],
const int varZ[20])