Are parent class constructors called before initializing variables, or will the compiler initialize the variables of the class first?
For example:
class parent {
int a;
public:
parent() : a(123) {};
};
class child : public parent {
int b;
public:
// question: is parent constructor done before init b?
child() : b(456), parent() {};
}
See Question&Answers more detail:os