Advertisement
Kwwiker

Stack.h

Apr 14th, 2021
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement