{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Stack - void Pop container.RemoveFirst const T& Top...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/*************** THE STACK CLASS ***************/ #ifndef __STACK__ #define __STACK__ #include "SList.h" template <class T> class Stack { public: bool IsEmpty() const { return container.IsEmpty(); } void Push(const T& item) { container.AddFirst(item); }
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: void Pop() { container.RemoveFirst(); } const T& Top() const { return container.ShowFirst(); } private: SList<t> container; }; #endif...
View Full Document

{[ snackBarMessage ]}