//Header File: intStack.h #ifndef INTSTACK_H #define INTSTACK_H #include using namespace std; class popOnEmpty { private: string message; public: popOnEmpty():message("Popping an empty stack...") {} string what() { return message; } }; class pushOnFull { private: string message; int value; public: pushOnFull(int i):message("Pushing a full stack..."), value(i) {} string what() { return message; } int valueOf() { return value; } }; const int maxSize = 2; class intStack { private: int top; int s[maxSize]; public: intStack(); void push(const int) throw (pushOnFull); int pop() throw (popOnEmpty); bool empty() const; bool full() const; }; #endif