fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. bool SortRule(int& Left, int& Right)
  7. {
  8. return true;
  9. }
  10.  
  11. int main()
  12. {
  13. std::vector<int> vecInteger;
  14.  
  15. for(int Index = 0; Index < 10; ++Index)
  16. {
  17. vecInteger.push_back(Index);
  18. }
  19.  
  20. std::sort(vecInteger.begin(), vecInteger.end(), SortRule);
  21.  
  22. for(const int& Integer : vecInteger)
  23. {
  24. std::cout << Integer << std::endl;
  25. }
  26.  
  27. return 0;
  28. }
Compilation error #stdin compilation error #stdout 0s 15240KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:20:2: error: ‘sort’ is not a member of ‘std’
  std::sort(vecInteger.begin(), vecInteger.end(), SortRule);
  ^~~
stdout
Standard output is empty