Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple inheritance in C++ [closed]

As you know, C++ allows multiple inheritance. But, would it be a good programming approach to use multiple inheritance or it should be avoided?

Thanks.

like image 291
Simplicity Avatar asked Jan 23 '26 06:01

Simplicity


1 Answers

In general, it's not needed and can make your code more complex.

But there are cases where it's useful. As long as it's useful and isn't causing your code to become unmanageable, I see no reason to avoid it.

like image 124
Jonathan Wood Avatar answered Jan 25 '26 20:01

Jonathan Wood



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!