let's say we have class A,B,C,D , where A is the base, B, C are between them, and D is in the diamond model.
NOTE:
class B inherits virtualy class A in mode ,
class C inherita virtualy class A in protected mode.
class A { public: int member;
Now that we are creating an instance of class D , what will the member be? private or protected lol?
Figure 2:
what if we do this:
class B : virtual public A
I believe member will be public in this second example, right?
source share