fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. struct properties{
  8. int index; // student's index number
  9. string name; // name of student
  10. int points; // points of exam
  11.  
  12. };
  13.  
  14. bool less_than(properties const& first, properties const& second)
  15. {
  16. return first.points < second.points;
  17. }
  18.  
  19.  
  20. int main()
  21. {
  22. vector<properties> students;
  23. sort(students.begin(), students.end(), less_than);
  24. return 0;
  25.  
  26. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Standard output is empty