Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stack>
- using namespace std;
- int main()
- {
- stack<int> myS;
- for(int i = 0; i < 10; i++)
- {
- myS.push(i);
- }
- cout << "size of myS is: " << myS.size() << endl;
- cout << "top of myS is: " << myS.top() << endl;
- while(!myS.empty())
- {
- cout << "deleting stack: "<<myS.top()<< endl;
- myS.pop();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment