Listing 6 An example illustrating scope rules for friend functions

void f()
       {
       class X
              {
       public:
              X(int i);
              operator int();
              // ...
       private:
              int n;
              // ...
              };
       X::X(int i) { n = i; )          // error
       X::operator int() return n; }   // error
       //...
       }
// End of File