我写了以下代码:
struct A{
int a;
int b;
A(int c): a(c), b(a){ }
};
int main()
{
A b(10);
}
现在,我不确定使用 a(c), b(a)
初始化 b
是否合适。这样做会导致未定义行为吗?