Guest User

Untitled

a guest
Jul 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #ifndef __STACK_H_INCLUDED__
  2. #define __STACK_H_INCLUDED__
  3.  
  4. #include "rover_util.h"
  5.  
  6. struct StackNode {
  7. StackNode* next;
  8. RoverOperation* data;
  9. ~StackNode();
  10. };
  11.  
  12. class stack
  13. {
  14. public:
  15. stack();
  16. ~stack();
  17. stack(const stack &other);
  18. stack& operator=(stack other);
  19.  
  20. void push(RoverOperation* data);
  21. RoverOperation* pop();
  22. RoverOperation* peek() const;
  23. bool isEmpty() const;
  24. void print() const;
  25. private:
  26. StackNode* head;
  27. int count;
  28. void copyStack(const stack other);
  29. //to be plugged in
  30. };
  31.  
  32. #endif
Add Comment
Please, Sign In to add comment