home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stl453up.zip / stl453fx / test / regression / queue1.cpp < prev    next >
C/C++ Source or Header  |  2002-04-29  |  536b  |  30 lines

  1. // STLport regression testsuite component.
  2. // To compile as a separate example, please #define MAIN.
  3.  
  4. #include <iostream>
  5. #include <algorithm>
  6. #include <queue>
  7. #include <list>
  8.  
  9. #ifdef MAIN 
  10. #define queue1_test main
  11. #endif
  12.  
  13. #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
  14. using namespace std;
  15. #endif
  16. int queue1_test(int, char**)
  17. {
  18.   cout<<"Results of queue1_test:"<<endl;
  19.   queue<int, list<int> > q;
  20.   q.push(42);
  21.   q.push(101);
  22.   q.push(69);
  23.   while(!q.empty())
  24.   {
  25.     cout << q.front() << endl;
  26.     q.pop();
  27.   }
  28.   return 0;
  29. }
  30.