2.2.1 What is it?

Listing 3:private
 
1class A 
2{ 
3    int i; 
4  protected
5    int j; 
6  public
7    int k; 
8}
9 
10class B : private A 
11{ 
12  public
13    int L; 
14}
15 
16class C : public B 
17{ 
18}
19 
20void test(void
21{ 
22  B myB; 
23 
24  myB.i = 0; 
25  myB.j = 0; 
26  myB.k = 0; 
27}

Again, class B acts as a gate. However, this time, the gate is very well guarded. Although class B has access to all the protected and public members of A, it exposes none of the member of A to the public or its descendents.