//Header File: stack.h #ifndef STACK_H #define STACK_H // INTERFACE template class stack { private: int top; T s[100]; public: stack (); void push(const T); T pop(); bool empty() const; bool full() const; }; // IMPLEMENTATION template stack::stack() { top=-1; } template void stack::push(const T item) { top++; s[top] = item; } template T stack::pop() { return (s[top--]); } template bool stack::empty() const { return (top==-1); } template bool stack::full() const { return (top==99); } #endif