stack1.cpp

We use cookies. Read the Privacy and Cookie Policy

stack1.cpp

#include ‹iostream.h›

#include ‹stl.h›

int main() {

 stack‹deque‹int› › s;

 s.push(42);

 s.push(101);

 s.push(69);

 while (!s.empty()) {

  cout ‹‹ s.top() ‹‹ endl;

  s.pop();

 }

 return 0;

}