Advertisement
Guest User

Untitled

a guest
May 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include "StaticStack.h"
  2.  
  3. int main(){
  4. StaticStack<int> num(6);
  5. num.push(10);
  6. num.push(20);
  7. num.push(30);
  8. num.push(40);
  9. num.push(50);
  10. num.push(60);
  11. num.view();
  12. cout<<num.top()<<endl;
  13.  
  14. num.pop();
  15. num.pop();
  16. num.pop();
  17. num.pop();
  18. num.pop();
  19. num.view();
  20. cout<<num.top();
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement