// File: oride.h
//
// Examples of derived class fucntions overriding base class functions


#ifndef _orride_h
#define _orride_h

#include <iostream.h>
#include <iomanip.h>
#include <stdlib.h>

class Base {
public:
   Base() : x(1) {} 
   int x ;

   void foo (int y)   { cout << x << " " << y << endl ; }
   void foo (int *p)  { cout << x << " " << *p << endl ; }
} ;


class PubDer : public Base {
public:
   PubDer() : z(3) {}
   int z ;

   void foo (char *s) { cout << x << " " << s << endl ; }
} ;


class PrivDer : private Base {
public:
   PrivDer() : z(2) {}
   int z ;

   Base::foo ;    // expose Base class identifier foo
} ;


#endif

