(Latest Revision: 02/13/2003)
Strange Queue Program Gotchas
- When you write the code for the queue operations, you need to use the
right form for the function headers and the calls that throw an exception.
Look at the implementation code for an array-based queue in
Repaired_QueueA/QueueA.cpp
to see what the form should be.
This is very close to the example in the book, but there may be some
differences. I had to make some changes to the textbook code to make it
work in our environment.
Note that there are "extra" error messages in the functions. I found that
a throw did cause the program to abort (my primary aim) but
did not write the error message. As a workaround I added statements
to print error messages. You can use the same technique if you like until
we find something that works better.