C++ gives you the power to do great things and multiple inheritance is one of the most powerful tools you’ll have. This doesn’t mean that you should always use it. Use it when it’s the right tool for the job just like any other tool. I’ll show you in this episode how to use multiple inheritance properly.

One of the biggest examples of why multiple inheritance is bad is the dreaded diamond. As long as you’re aware of this problem, it’s not really a problem anymore and you should be fine. That doesn’t mean all your designs should involve base classes that get included multiple times. I tend to have the best results when I avoid the diamond entirely. But there are times when it’s perfectly acceptable as long as you use virtual inheritance.

You also learn about a common application of multiple inheritance that can also lead to problems. This time the problem is just that you end up with a lot of classes. The point I make though is that a lot of classes might be exactly what you need. With multiple inheritance, you can decide. When all you have is single inheritance and some interfaces, then the language has already made the choice for you.