fork download
  1.  
  2. #define _STLP_USE_STATIC_LIB
  3. #define _STLP_USE_OWN_NAMESPACE 1
  4. #define _STLP_DONT_REDEFINE_STD 1
  5. #include <stlport/vector>
  6. #include <stlport/iostream>
  7. #include <stlport/algorithm>
  8. #undef __SGI_STL_PORT
  9. #undef _STLPORT_VERSION
  10. //#include <auto_link_stlport.hpp>
  11.  
  12. #include <iostream>
  13. #include <algorithm>
  14. #include <vector>
  15.  
  16.  
  17. typedef stlport::vector<int> intsp;
  18. typedef std::vector<int> ints;
  19.  
  20. int main(int argc, char* argv[])
  21. {
  22. intsp ary1;
  23. ints ary2;
  24. for (int i = 0; i < 10; ++i)
  25. {
  26. ary1.push_back(i);
  27. ary2.push_back(i);
  28. }
  29. for (intsp::iterator it = ary1.begin(); it != ary1.end(); ++it)
  30. {
  31. std::cout << *it;
  32. stlport::cout << *it << " ";
  33. }
  34. stlport::cout << stlport::endl;
  35. std::random_shuffle(ary1.begin(), ary1.end());
  36. stlport::random_shuffle(ary2.begin(), ary2.end());
  37. for (int i = 0; i < ary2.size(); ++i)
  38. {
  39. std::cout << ary1[i];
  40. stlport::cout << ary2[i] << " ";
  41. }
  42. std::cout << std::endl;
  43. stlport::sort(ary1.begin(), ary1.end());
  44. //stlport::sort(ary2.begin(), ary2.end()); // error C2665
  45. std::sort(ary2.begin(), ary2.end());
  46. //stlport::stable_sort(ary2.begin(), ary2.end()); // error C2665
  47. for (int i = 0; i < ary2.size(); ++i)
  48. {
  49. std::cout << ary1[i];
  50. stlport::cout << ary2[i] << " ";
  51. }
  52. return 0;
  53. }
  54.  
  55.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:26: fatal error: stlport/vector: No such file or directory
 #include <stlport/vector>
                          ^
compilation terminated.
stdout
Standard output is empty