struct结构体 重载运算符

struct node{
    int x,y,z;
}; 
bool operator<(node a,node b)
{
    if(a.x!=b.x) return a.x<b.x;
    if(a.y!=b.y) return a.y<b.y;
    return a.z<b.z;
}
原文地址:https://www.cnblogs.com/akioi/p/12200049.html