/* intstack.h -- A variation on Prof.LaFollette's code */ #ifndef _INTSTACK_H_ #define _INTSTACK_H_ class IntStack { public: IntStack(int maxSize = 100); //construct stack of given size (with default) IntStack(const IntStack &); //copy constructor ~IntStack(); //destructor IntStack & operator=(const IntStack &); //assignment operator for deep copy bool isempty() const; bool isfull() const; void push(int); int pop(); int peek() const; //return top value without popping it. private: int *body; //body of the stack int length; //will hold maximum size int sp; //stack pointer }; #endif