// This code illustrates ambiguity. // The assignment to d.x will not compile. class Base1 { public: int x; }; class Base2 { public: int x; }; class Derived : public Base1, public Base2 { public: int y; }; int main() { Derived d; d.y = 0; // Great--there's only one y, in Derived. d.x = 1; // Oops--Base1::x or Base2::x? }