C++如何用运算符重载而不用get函数 根据学号排序

图片说明

bool operator<(const StudentInfo &a2)const{
return StudentID<a2.StdentID;
}

然后就可以愉快的用sort函数了