struct A{
int x;
int y;
};
A a{.x = 0, .y=0};//valid c, valid C++
B b{.y = 0, .x=0};//valid c, invalid C++
C++无序初始化成员
最新推荐文章于 2024-07-06 08:28:38 发布
struct A{
int x;
int y;
};
A a{.x = 0, .y=0};//valid c, valid C++
B b{.y = 0, .x=0};//valid c, invalid C++