Assignment #4: Reverse Iterators

Add reverse iterators to the STL list class that was developed in class. The original list class is linked to on the lectures page.

Spec

Add a pair of rbegin and rend functions to the list class. Then add implementations of reverse_iterator and const_reverse_iterator.

This assignment is much simpler than the previous two. The reverse iterator is like the regular iterator except that ++ and -- are reversed. Operations like == and != are unchanged, so if you use inheritance you can get by with little code.

Test Program

I will provide a test program next week. Your code must work with it. Note the header files StartConv.h and EndConv.h. These contain #defines that change list to List, in order to avoid possible conflicts with the STL. You should continue to include them in your implementation.

What To Submit

Submit all your source code and the results of running the test program.

Due Date

This program is due on Tuesday, Oct 26.