Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <stack>
- using namespace std;
- int main ()
- {
- vector<int> numbers{4, 15, 8, 7, 9, 31};
- stack <int> s;
- for (auto i : numbers){
- s.push(i);
- }
- cout << "\ns.size() : " << s.size();
- cout << "\ns.top() : " << s.top();
- cout << "\ns.pop() : ";
- cout << &s.top();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment