Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef STACK_H_
- #define STACK_H_
- template <typename Type>
- class Stack {
- private:
- struct Node { Type item; Node * next; };
- Node *mFront;
- Node *mRear;
- int mSize;
- int mItemCount;
- public:
- Stack(int size);
- Type pop();
- void push(const Type &itemToAdd);
- bool isEmpty() { return mItemCount == 0; }
- bool isFull() { return mItemCount == mSize; }
- ~Stack();
- };
- #endif // !STACK_H_
Add Comment
Please, Sign In to add comment