// testmyq6.cpp -- by tsaiwn@csie.nctu // g++ testmyq6.cpp ; ./a.out using namespace std; #include "myq6.h" //注意以下是 1999之後的 C++ 新寫法, 舊法使用 #include int main( ) { MyStack x; // 注意這! 其實是 queue !! x.push(880); x.push(770); x.push(53); while(!x.empty( )){ cout << x.top( )<< " "; x.pop( ); } cout << endl; }