Hello Experts!!
Assume you have the following diamond inheritance structure.
Assume the following at the top you have the Ancestor class and below this
class
at the same level we have class Child1 and Child2.
Class Descendatnt is derived class Child1 and Child2.
Assume also that in the top class we have one datamember called number and
one method called getNumber(). If you don't use virtual inheritance you will
get compile error.
Assume you get compile error because of not using virtual inheritance.
Now to my question is it corrext to say that in class Descendant you will
get two
subobjects of class Ancestor one from Child1 and the other from Child2.
Or is it more correct to say that the datamember number will appear in the
Descendats twice because of
being inheritaded twice one from class Child1 and the other inheritaded from
class Child2.
The same will happen with the method getNumber you will have two one from
Child1 and one from Child2
//Tony