i have seen an inheritance statement like this

className : virtual public anotherClassName

what does virtual mean there?

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.

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

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)

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 ;)...

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.