#include #include using namespace std; class A { public: int a; A(int a): a(a){} }; class D : public A, public A { // error: duplicate base type A invalid public: int d; D(): d(9){} }; int f(D &x){ // problem: how should we select one or the other A branch? cout << x.A::a << endl; cout << x.d << endl; } int main(){ D d; f(d); }