
    oOϥ C++ STL O{w queue, O@ template class.
STL Ok@ Meng Lee b HP qWZɰѦҸƵcҥg˪OO{w
     queue [J queue ] push, ҥHڭ̥ #define enque push
o macro definition {Ψ enque אּ push
]k@Sg enque( ), og push( ), HKΰ_ӻP stack Ϊk,
t~, queue YӤ]iH top( ), զD? iSӨ? 
iHݬ http://cplusplus.com/STL
Lڭ̥ #define  front NiHF, ܤk@꦳g front( )

tsaiwn@magpie % cat -n testq4.cpp 
    1 //testq4.cpp -- using class queue in STL (Standard Template Library)
    2 // CopyLeft by tsaiwn@csie.nctu.edu.tw
    3 // STL Ok@Meng Lee b HPqWZɰѦҸƵcҥg
    4 #define enque push
    5 #define top front
    6 // HU #ifndef OΨ check O_ GNU  g++ ?
    7 // YOhϥ¦gk! Ҧp Turbo C++ 3.0 u{¦gk!
    8 #ifndef __GNUG__
    9   #include <iostream.h>
   10   #include <stl.h>
   11 #else
   12   #include<iostream>
   13   #include <queue>
   14   #include <vector>
   15   #include <list>
   16   using namespace std;
   17 #endif
   18 ////// ////// ////// ////// ////// //////
   19 int main( ) {
   20     queue<long> xo;       // queue is a template class in STL
   21         // default, queue O deque (double ended queue)
   22     queue<double, vector<double> > brandy;  //  vector
   23     queue<long, list<long> > wine;  // nD list
   24     xo.enque(53);
   25     xo.push(770);
   26     xo.push(880);
   27     while(!xo.empty( ) ) {
   28        cout << xo.top( ) << " "; xo.pop( );
   29     }
   30     cout << endl;   // new line
   31     return 0;
   32 }

tsaiwn@magpie % g++ testq4.cpp 
tsaiwn@magpie % ./a.out
53 770 880

tsaiwn@magpie % echo p625

D:\test> path C:\Dev-Cpp\bin;%path%

D:\test> g++ testq4.cpp

D:\test> a.exe
53 770 880

D:\test>
