If I needed to initialize only a few select values of a C++ struct, would this be correct:
struct foo {
foo() : a(true), b(true) {}
bool a;
bool b;
bool c;
} bar;
Am I correct to assume I would end up with one struct
item called bar
with elements bar.a = true
, bar.b = true
and an undefined bar.c
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…