Home > Back-end >  Could you tell me how to do this
Could you tell me how to do this

Time:09-21

Have the following program structure, please analyze all members within the scope of the various access,
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.html
Can first try to understand it
  • Related