Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "StackADT.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- StackADT<int> stack/* = new StackADT<int>()*/;
- stack.push(2);
- stack.push(3);
- stack.push(4);
- stack.push(1);
- stack.push(10);
- cout << "Top: " << stack.topValue() << endl;
- cout << "Size: " << stack.length() << endl;
- stack.pop();
- stack.push(120);
- stack.push(10992);
- cout << "Top: " << stack.topValue() << endl;
- cout << "Size: " << stack.length() << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement