3
Contributors
8
Replies
9
Views
8 Years
Discussion Span
Last Post by serkan sendur
0

It's to solve the diamond inheritance problem where you have a base class, then 2 child classes then a 4th class that inherits from both of the previous classes. If the base class declares a function then there is ambiguity of that function in the 4th class. Declaring the 2 child classes as inheriting virtually will allow the implementation of the base class's to fall through to the 4th class.

0

being able to inherit from more than one classes does not seem to be useful, that might be why it is not possible in C# or JAVA

0

being able to inherit from more than one classes does not seem to be useful, that might be why it is not possible in C# or JAVA

Heh, that's a whole 'nother thread to talk about the benefits, caveats and downfalls of multiple inheritance. Suffice it to say that it's definitely a bonus that C++ has it (sometimes)

0

being able to inherit from more than one classes does not seem to be useful, that might be why it is not possible in C# or JAVA

Well, Money == Evil, that's why there are lots of paupers in the World ;)...

0

Well, Money == Evil, that's why there are lots of paupers in the World ;)...

i didnt get it :( (probably language deficiency)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.