Class A
{public:
Void f1 ();
Protected:
Void f2 ();
Private:
int i;
};
Class B: public A
{public:
Void f3 ();
int k;
Private:
Int m;
};
Class C: protected B
{public:
Void the f4 ();
Protected:
Int m;
Private:
int n;
};
Class D: private C
{public:
Void (f5);
Protected:
Int p;
Private:
Int q;
};
Int main ()
{A, a1.
B, b1;
C c1;
D d1;
}
CodePudding user response:
Portal https://www.cnblogs.com/motadou/archive/2010/03/12/1683974.htmlCan first try to understand it