class A {
public:
void fa() {
}
};
class B : public A{
public:
void fb() {
}
};
class C : public A, public B {
public:
void fc() {
//call A::fa(), not B::A::fa();
}
};
How to call A::fa()
from C::fc()
function.
GCC warns withdirect base A inaccessible in C due to ambiguity
, does this mean there is no direct way to refer base class members?
class B
doesn't inheritclass A
. Have you put the updated code ? – WireworkA
base class subobject forC
or twoA
base class subobjects (one fromC
deriving fromA
and one fromB
deriving fromA
)? Right now you have two, which may or may not be your intent. – Washedout