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
You have to specify virtual
inheritance when inheriting from any of A, B, C, and E classes (that are at the top of a diamond).
class A;
class B: virtual A;
class C: virtual A;
class D: virtual B;
class E: virtual B, virtual C;
class F: virtual C;
class G: D, virtual E;
class H: virtual E, F;
class I: G, H;