From 2afaacd75ce4323c9fd22cc5738f274e242f7ec2 Mon Sep 17 00:00:00 2001 From: Morgan Cyrus Date: Sun, 30 Oct 2022 11:48:20 -0700 Subject: removed const --- CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index 4c03c8c..4aec064 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -105,8 +105,11 @@ * * 5 Obviously there is a problem. Remove the const from the * function declaration and header for varX. +* done * * 5) Now you should be able to build and execute your code. Do it. +* done +* * 6) Set a breakpoint on Breakpoint 2. * 7) Re-enable Breakpoint 2. * 8) Run to Breakpoint 2 and make sure you have a watch on the @@ -129,9 +132,8 @@ using std::setw; void GetAndDisplayWelcomeInfo(); void FunctionOne(int varX[], int varY[]); -void FunctionTwo(const int varX[], const int varY[], int varZ[]); -void PrintFunction(const int varX[], const int varY[], - const int varZ[]); +void FunctionTwo(int varX[], const int varY[], int varZ[]); +void PrintFunction(int varX[], const int varY[], const int varZ[]); const int SIZE = 10; @@ -181,12 +183,12 @@ void FunctionOne(int varX[], int varY[]) for (int x = 0; x < SIZE; x++) varY[x] = x + 100; } -void FunctionTwo(const int varX[], const int varY[], int varZ[]) +void FunctionTwo(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]; } -void PrintFunction(const int varX[20], const int varY[20], +void PrintFunction(int varX[20], const int varY[20], const int varZ[20]) { int x; -- cgit v1.2.3