//stk5STLnew.cpp, CopyLeft by tsaiwn@csie.nctu.edu.tw
// g++ stk5STLnew.cpp ; ./a.out
#include <iostream>
#include <stack>
// 新寫法沒有 .h 但要記得如下列的 using namespace std;
using namespace std; // 因為C++ class library被集合到命名空間 std::
int main( ) {
   stack <int> x;    // STL 中的 stack 是 template
   x.push(880);
   x.push(770);
   x.push(53);
   while(!x.empty()){
      cout << x.top() << " ";  x.pop();
   }
   cout << endl;
   return 0;
} // main( 
/******
D:\test> path C:\Dev-Cpp\bin;%path% 

D:\test> g++ stk5STLnew.cpp

D:\test> a.exe
53 770 880

D:\test>
******************************************/