// FILE: Stackt.h // ---------------------------------------------------------- // Definition of templated (or container) Stack class // Stack of class T implemented as linked list // ---------------------------------------------------------- #ifndef STACKT_H #define STACKT_H template class Stack { public: Stack(void); Stack(const Stack &s); ~Stack(void); void push(const T &item); void pop(T &item); void pop(void); Stack &operator=(Stack &rhs); const T &top(void) const; bool isEmpty(void) const; int length(void) const; void print(void) const; void makeEmpty(void); private: struct NodeType { T info; NodeType *next; }; NodeType *myTop; }; #endif // STACKT_H