4

wudiyu 2023-11-19 11:37:01

struct Student{ int id, age; double score; void input(){ cin >> id >> age >> score; } void output(){ cout << id << " " << age << " " << score << endl; } bool operator <(const Student &o) const{ return score<o.score; } };

共 1 条回复

wudiyu

struct Student{ int id, age; double score; void input(){ cin >> id >> age >> score; } void output(){ cout << id << " " << age << " " << score << endl; } bool operator <(const Student &o) const{ return score<o.score; } };