Question: Now, remove the keyword virtual from the base class list of Person and Horse (that is, LifeForm will no longer be a virtual base class

Now, remove the keyword virtual from the base class list of Person and Horse (that is, LifeForm will no longer be a virtual base class of Person and Horse. LifeForm will just be a typical base class of Person and Horse.) Also, remove the LifeForm constructor selection from the member initialization list of the centaur constructors. Now, instantiate Centaur:

1. How many LifeForm subobjects exist for the instance of Centaur?

2. Now, how many times is the LifeForm constructor (and destructor) invoked?

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related A Practical In Depth Guide C++ Questions!