Listing 10 Illustrates access rules for nested classes

class X
       {
public:
       int i;
       static char *s;
       class Y
              {
       public:
              void f();
              };
       };

void X::Y::f()
       {
       s = 0;   // ok, X::s is static
       i = 0;   // error, X::i is non-static
       }

// End of File