#ifndef STACK_H #define STACK_H class Stack { private: int *array; // use a pointer so the size can vary int ptr; // the first 'empty' cell in the array int size; // size of array / # of items stack holds public: Stack(); // default constructor Stack(int s); // constructor with size parameter ~Stack(); // destructor - added after class but very important int push (int item); // push item onto stack. return 1 if it worked // or 0 if something went wrong int pop(int & item); // pop item off stack. Value ends up in item, // return 0 if stack empty, otherwise 1 }; #endif