64,636
社区成员
发帖
与我相关
我的任务
分享
struct myComp
{
bool operator() (const int &a, const int &b)
{
return a < b;
}
};
class Mycmp
{
public:
string name;
float score;
bool operator < (const cmp &a) const // 最后必须有const 否则运行不通过
{
return a.score < score;
}
};