When is virtual inheritance needed?
Multiple inheritance is a powerful and useful feature in C++, but it can lead to a problem known as the DDD or “Deadly Diamond of Derivation”, as in this case:
Multiple inheritance is a powerful and useful feature in C++, but it can lead to a problem known as the DDD or “Deadly Diamond of Derivation”, as in this case: