Exercises in this lecture  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Go to the slide, where this exercise belongs -- Keyboard shortcut: 'u'  

Exercise 5.4
Ignoring constructors in virtual base class


Take a look at the class hierarchy on this slide and in this program - in particular how the class D constructor relies on the default constructors in class B and C. Which constructor is used in the A class?

In this program we show a way out of the problem. Please be sure that you both understand the problem - and the solution.


Solution