关于运算符重载
帮我解释一下这段程序,特别是bool operator.....这一段什么意思?
class ID
{
public:
string Name;
int Score;
ID(string name,int score):Name(name),Score(score){}
};
bool operator ==(const ID&x,const ID &y)
{
return (x.Name==y.Name)&&(x.Score==y.Score);
}
bool operator <(const ID &x,const ID &y)
{
return x.Score<y.Score;
}