CS12, Lab 6
Topics:
·
Debugging programs
·
Using the debugger
·
Recursion
To do:
·
Listen carefully
as your TA describes the use of the debugger. Take copious notes,
especially if you are a CS major. As your programs and projects become
more complex, you will be relying on debugging tools more heavily. This
topic will not, to the best of my knowledge, be covered in any other
class. Use this opportunity well.
·
Copy the files
bug1.h ,
bug1.cc ,
mainbug1.cc ,
bug2.h ,
bug2.cc ,
mainbug2.cc ,
bug3.cc and
makefile
into a directory. There are three buggy programs in all, and a
makefile that works for all of them. Compile and run each program (the
makefile has instructions on how to do this), then
try to find the bugs. There are to do lists, comments and hints in the files
themselves. Please use the debugger, unless the you can spot the
problem by looking at the code for less than a minute. Solve any two
problems for full credit (5 points each), the fourth for extra credit (3
points).