结构体初始化这两种写法有什么不同吗?
一个是用函数,一个直接在结构体内变量上赋值:
struct node{ int x=1,y=1; };
struct node{ int x,y; node(){x=1,y=1;} };