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 doesn't inherit directly from Base, only through A and B. So why does gcc complain here?
Ideas? TIA /Rob