2
votes
1answer
141 views

Code re-use in C++, via multiple inheritance or composition? Or…?

I originally asked this question on StackOverflow, but I was directed here, and I think my problem is perhaps as much conceptual as technical, so here goes. If you’re defining a hierarchy of abstract ...
-1
votes
1answer
119 views

Size of objects during Multilevel inheritance [closed]

Below is a pseudo declaration for a multilevel inheritance. Base class ( protected int data) derived1 : virtual public base ( protected int data1 ) derived2 : virtual public base ( protected int ...
9
votes
2answers
1k views

How does C++ handle multiple inheritance with a shared common ancestor?

I'm not a C++ guy, but I'm forced to think about this. Why is multiple inheritance possible in C++, but not in C#? (I know of the diamond problem, but that's not what I'm asking here). How does C++ ...