友元函数 / 重载$operator$ 友元函数 12345 friend bool operator <(const node &a,const node &b){ return a.x<b.x; ........}const修饰表示不可修改&直接传的是地址,速度更快 重载operator 123 bool operator<(const node &a) const{ return x<a.x; .......} 赞微海报分享
近期评论