Question: C++ Programming: If class B2 inherits class B1 as public. Then, if class C tries to inherit both B1 and B2? If class B2 inherits class B1 as public. Then, if class C tries to inherit both B1 and B2, by multiple inheritance, what would happen? Please explain clearly.

Answer: Then you will be faced with the 'lattuce' problem, that is, for a certain virtual method, the compiler will not know which base class to use (either the left or the right).\n\nSome compilers solve the issue by emitting an error if there is no explicit override of every method that can incurr in this inconvenient.
This question from the Yahoo Q&A forum is categorized in the topic: Education & Reference