#ifndef STACKH #define STACKH #include //for size_t using namespace std; class stack { static const size_t max_size = 100; int a[max_size]; size_t n; //stack pointer: subscript of next free element public: stack(): n(0) {} virtual ~stack() {} virtual void push(int i) {a[n++] = i;} virtual int pop() {return a[--n];} size_t size() const {return n;} static size_t capacity() {return max_size;} }; #endif