Kwwiker

Stack.h

Apr 14th, 2021
561
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef __STACK_H
  2. #define __STACK_H
  3. using namespace std;
  4.  
  5. class Stack {
  6. public:
  7.     Stack(int size);
  8.     void push(int elem);
  9.     void pop();
  10.     int peek();
  11.     int getSize();
  12.     int getQuantity();
  13.     bool isEmpty();
  14.     void makeEmpty();
  15. private:
  16.     int m_size;
  17.     int m_quantity = 0;
  18.     int* m_list;
  19. };
  20.  
  21. #endif
  22.  
RAW Paste Data