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

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