home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stl453up.zip / stl453fx / test / regression / pqueue1.cpp < prev    next >
C/C++ Source or Header  |  2002-04-29  |  559b  |  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 <deque>
  7. #include <queue>
  8.  
  9. #ifdef MAIN 
  10. #define pqueue1_test main
  11. #endif
  12.  
  13. #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
  14. using namespace std;
  15. #endif
  16. int pqueue1_test(int, char**)
  17. {
  18.   cout<<"Results of pqueue1_test:"<<endl;
  19.   priority_queue<int, deque<int>, less<int> > q;
  20.   q.push(42);
  21.   q.push(101);
  22.   q.push(69);
  23.   while(!q.empty())
  24.   {
  25.     cout << q.top() << endl;
  26.     q.pop();
  27.   }
  28.   return 0;
  29. }
  30.