From 7a644e349767fd9fd5bfa757d6efcb74954a3906 Mon Sep 17 00:00:00 2001 From: prestonderek Date: Wed, 12 Oct 2022 19:35:21 -0700 Subject: Commit at completion of Debug 1. --- CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp') diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp index 53e4a61..9bc85e8 100644 --- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp +++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp @@ -51,6 +51,8 @@ * 6) Where was 10 assigned to count? * 7) Fix the problem and re-run to verify. ********************************************************************/ +//Finished debug 1. Removed ; from while loop. This still isn't working correctly though. + #include using std::cout; using std::endl; @@ -62,13 +64,13 @@ int main() // Breakpoint 1 // Put a breakpoint on the following line - while (i < 0); - cout << i << endl; + while (i < 0) + cout << i << endl; // Breakpoint 2 // Put a breakpoint on the following line for (count = 0; count < 10; count++); - cout << count << endl; + cout << count << endl; return 0; } -- cgit v1.2.3