You can use virtual inheritance to overcome this problem:
class B : virtual public A {
Now you can use A::fa() simply in a child class C
void fc() { fa(); }
However, I do not see the practical need to inherit class A again in class C , when B already public , inheriting A So in your case you can make it simple:
class C : public B {
Edit
If you want 2 instances for A then the direct instance that you intend can be made as a C object:
class C : public B { A obj;
Because if inherited A will not be directly used, in any case. You cannot declare any pointer or reference to it inside the scope of C
iammilind
source share