Listing 5 Decoupling the class hierarchy structure from application code using a member typedef

//
// class library code
//

class B
   {
public:
   void f();
   ...
   };

class D: public B
   {
public:
   typedef B inherited;
   void f();
   };

//
// library user's code
//

void g(D *pd)
   {
   pd->inherited::f();
   ...
   }
// End of File