In this section we will examine a pointer-based implementation of stacks that makes use of the LinkedList<T> data structure developed in Chapter . Program gives the declaration of the concrete object class StackAsLinkedList and its associated iterator, StackAsLinkedList::Iter. As in the preceding section, the function prototypes for the interface inherited from the Container base class have been elided for the sake of brevity. Of course, implementations must be provided for all of the inherited member functions which are declared pure in the base class.
Program: StackAsLinkedList Class Definition