Question:
Which one of the following statements is true when a derivation inherits
both a virtual and a non-virtual instance of a base class?
Correct Answer:
Each derived class object has a base object from the virtual instance and a
base object from non-virtual instance.
Comment:
This is correct. The existence of a virtual base does not imply the use of
virtual in the base class list where it is not specified (C++ Standard 10.1/
6).
c**********e 发帖数: 2007
2
Does the question talk about multiple inheritance? This is a point that
I am not sure. Any guru, help please!
a
of
1/
【在 c**********e 的大作中提到】 : Question: : Which one of the following statements is true when a derivation inherits : both a virtual and a non-virtual instance of a base class? : Correct Answer: : Each derived class object has a base object from the virtual instance and a : base object from non-virtual instance. : Comment: : This is correct. The existence of a virtual base does not imply the use of : virtual in the base class list where it is not specified (C++ Standard 10.1/ : 6).