#include #include #include using namespace std; int main() { stack s; //Born empty because we gave no args to constructor. cout << "empty == " << s.empty() << ", size == " << s.size() << "\n"; s.push(10); s.push(20); s.push(30); cout << "empty == " << s.empty() << ", size == " << s.size() << "\n"; cout << s.top() << "\n"; s.pop(); //returns void, unlike the stack::pop we wrote cout << s.top() << "\n"; s.pop(); cout << s.top() << "\n"; s.pop(); cout << "empty == " << s.empty() << ", size == " << s.size() << "\n"; return EXIT_SUCCESS; }