#include "itemtype.h" // typedef for ItemType #define MAXSTACKSIZE 100 // The bool's that are returned by the methods take value 1 if the // method succeeds and 0 otherwise (if there is overflow, underflow, etc.) class Stack { public: Stack(); bool Init(); //(re-)Initializes the stack by emptying it bool IsEmpty(); //tests if stack is empty bool IsFull(); //tests if stack is full bool Push(ItemType); //pushes ItemType onto stack bool Pop(ItemType &); //pops stack and sets ItemType to popped value private: int count; /* number of items in stack */ ItemType data[MAXSTACKSIZE]; };