What is multiple inheritance, and what problems can it cause?
Show answer and explanation
Multiple inheritance lets one class derive from more than one base. It can create ambiguous member lookup, duplicated base subobjects in a diamond, more complex construction order, and tighter coupling; virtual inheritance can make a diamond share one virtual base but adds its own complexity. Multiple inheritance works best for small orthogonal interfaces, while composition is usually clearer for combining stateful implementations.
Multiple inheritance lets one class derive from more than one base. It can create ambiguous member lookup, duplicated base subobjects in a diamond, more complex construction order, and tighter coupling; virtual inheritance can make a diamond share one virtual base but adds its own complexity. Multiple inheritance works best for small orthogonal interfaces, while composition is usually clearer for combining stateful implementations.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.