C++结构体重构
#include<cstdio>
using namespace std;
struct node
{
	int x,y;
	node() {x=0,y=0;}// 赋初值
	bool operator > (node &a) {return x.x>x;}//重构运算符
}a,b;
int main()
{
	a=(node){3,3};b=(node){4,2};
	if (a>b) b=a;
	printf("%d %d\n",b.x,b.y);
	return 0;
}
希望能对你有用!
    转载需注明出处。
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号