SHARE
TWEET

BaseStack

WsumrakW May 26th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. template <typename ItemType>
  2. class BaseStack
  3. {
  4. public:
  5.     BaseStack() {}
  6.     virtual BaseStack<ItemType>& push(const ItemType& item) = 0;
  7.     virtual BaseStack<ItemType>& pop() = 0;
  8.     virtual ItemType& peek() = 0;
  9.     virtual const ItemType& peek() const = 0;
  10.     virtual int length() const = 0;
  11.     virtual bool isEmpty() const = 0;
  12.     virtual ~BaseStack() {}
  13. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top