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

  1. // STLport regression testsuite component.
  2. // To compile as a separate example, please #define MAIN.
  3.  
  4. #include <iostream>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <functional>
  8.  
  9. #ifdef MAIN 
  10. #define func3_test main
  11. #endif
  12.  
  13. #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
  14. using namespace std;
  15. #endif
  16. int func3_test(int, char**)
  17. {
  18.   cout<<"Results of func3_test:"<<endl;
  19.   vector<int>v;
  20.   v.push_back(4);
  21.   v.push_back(1);
  22.   v.push_back(5);
  23.   sort(v.begin(), v.end(), greater<int>());
  24.   std::vector<int>::iterator i;
  25.   for(i = v.begin(); i != v.end(); i++)
  26.     cout << *i << endl;
  27.   return 0;
  28. }
  29.