[???]运算符重载

结构体 运算符重载

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

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];

 

posted @ 2017-11-10 08:36  hdsmwww  阅读(278)  评论(0)    收藏  举报