/* Stack.H: simple stack implementation */ #ifndef _STACK_H_ #define _STACK_H_ #include "Array.H" template class stack: public array { public: stack(int len =0) { init(len, 0); }; void push (const T& elem) { append(elem); }; T& pop(void) { return operator[](--size); }; }; #endif /* _STACK_H_ */