[???]运算符重载

结构体 运算符重载

八百年都记不住怎么写[/微笑]

1 struct data
2 {
3     int x,y;
4     bool operator < (const data &a)const
5     {
6         return x<a.x; //.x小的放前面 
7     }
8 }bala[121021];
原文地址:https://www.cnblogs.com/taojy/p/7812845.html