// STL stack demo #include #include using namespace std; int main() { stack stackExample; stackExample.push(51); stackExample.push(23); stackExample.push(19); stackExample.push(60); cout << "size = " << stackExample.size() << endl; while (stackExample.size() != 0) { cout << stackExample.top() << " "; stackExample.pop(); } if (stackExample.empty()) { cout << endl << "The stack is empty" << endl; } return 0; }// end of main