diff options
Diffstat (limited to 'CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp')
| -rw-r--r-- | CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <iostream>
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;
}
|