How do I sort the below code by name, age and score... all three fields
#include <string>
#include <vector>
#include <algorithm>
struct student_t
{
std::string name;
int age, score;
};
bool by_more_than_1_field( student_t const &lhs, student_t const &rhs )
{
// sort by name, age and score
}
int main()
{
std::vector< student_t > students;
// populate students
std::sort( students.begin(), students.end(), by_more_than_1_field );
}