Hello,
I am new to using multiple inheritance in C++. I read
up few tutorials on the net and picked up the usage of
virtual inheritance. Can someone through light on
whats happening in virtual inheritance 'under the
hood'. Also, I have few other questions. Consider the
following inheritance diagram.
Base
/ \
/ \
Base1 Base2
\ /
\ /
Derived
I would like to implement such an inheritance. The
solution suggested in the tutorials was to inhert
Base1 and Base2 by virtual public inheritance from
Base to avoid member ambiguity. All this is fine if
both the left branch and the right branch are
implemented by me. But what if one of the branches
above was from a 3rd party library which I am making
use of? If the library implements virtual inheritance,
then all is fine. But what if it does not?
Also, is there a way of implementing the above
inheritance without using multiple inheritance?!!
Thanking you in advance,
Siva Chandra
__________________________________
Do you Yahoo!?
Jazz up your holiday email with celebrity designs. Learn more.
http://celebrity.mail.yahoo.com
|