// mymaincc.cpp -- CopyLeft by tsaiwn@csie.nctu.edu.tw // g++ mymaincc.cpp ; ./a.out // ..這個版本要求用 做的 stack (default 是用 deque 做的) using namespace std; // 新的 #include 寫法須搭配這 std:: namespace //注意以下是 1999之後的 C++ 新寫法, 舊法使用 #include #include #include int main( ){ stack > x; // 注意這與空格! ! ! x.push(880); x.push(770); x.push(53); while(!x.empty()){ cout << x.top(); x.pop(); } cout << endl; }