X would call the method in X. to access other methods from other classes use X.C::method(); assuming that B is not derived from A and C from B.
Code:
#include <iostream>
using namespace std;
class A
{
public:
A() {};
~A() {};
char getName()
{
return 'A';
}
};
class B
{
public:
B() {};
~B() {};
char getName()
{
return 'B';
}
};
class C
{
public:
C() {};
~C() {};
char getName()
{
return 'C';
}
};
class X : public A, public B, public C
{
public:
X() : A(), B(), C() {};
~X() {};
char getName()
{
return 'X';
}
};
int main(int argc, char * argv[])
{
X sample;
cout << "sample.getName() -> " << sample.getName() << endl
<< "sample.A::getName() -> " << sample.A::getName() << endl
<< "sample.B::getName() -> " << sample.B::getName() << endl
<< "sample.C::getName() -> " << sample.C::getName() << endl;
return 0;
}