Lab #4, Wednesday 9/20

The purpose of this lab is to familiarize yourself with the Visual Studio Debugger (or if you prefer you can use another IDE's debugger).

Start with the buggy version of lab 3's three-question trivia game and enter it into a Visual Studio project (or use another IDE). Set a breakpoint and step through the program. Use the debugger to show how the errors could be found by:

  1. Stepping through line by line, showing it executes the line with getline(cin, answer) without pausing for user input
  2. Using the debugger to see that the variable answer is blank
  3. Using the debugger to see the contents of the questions array and that the value in variable i starts at 1, skipping question 0
  4. Using the debugger to see that answer and realAnswer are not converted to lowercase after calling the toLowerCase function.

You don't need to fix the errors. Show the three debugging items to the instructor or lab assistant for credit, or email screenshots to kjmock@alaska.edu by midnight for lab credit.