c++ virtual inheritance
问题 Problem: class Base { public: Base(Base* pParent); /* implements basic stuff */ }; class A : virtual public Base { public: A(A* pParent) : Base(pParent) {} /* ... */ }; class B : virtual public Base { public: B(B* pParent) : Base(pParent) {} /* ... */ }; class C : public A, public B { public: C(C* pParent) : A(pParent), B(pParent) {} // - Compilation error here /* ... */ }; At the position given, gcc complains that it cannot match function call to Base(), i.e. the default constructor. But C