内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
class Base {}; class DerivedBaseOne : public Base {}; class DerivedBaseTwo : public Base {}; class Derived : public DerivedBaseTwo, public DerivedBaseOne {}; //somewhere in the code, is Base() called two times here? Derived * foo = new Derived();
Base()构造函数是否被调用两次?构造函数是按什么顺序调用的?