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?
baris a variable.typedef struct foo {} bar;.baris the struct, what'sfoo? Is this the same as defining afoostruct and separately declaring a new variablebaras typefoo?struct foo {//something};foo bar;