I understand the basics of C++ virtual inheritance. However, I\'m confused about where exactly I need to use the virtual keyword with a complex class hierarchy. F
If you want to make sure that an object of the top class in the hierarchy (I in your case) contains exactly one subobject of each parent class, you have to find all classes in your hierarchy that have more than one superclass and make these classes virtual bases of their superclasses. That's it.
In your case classes A, B, C and E have to become virtual base classes every time you inherit from them in this hierarchy.
Classes D, F, G and H don't have to become virtual base classes.