#ifndef DERIVED_C #define DERIVED_C //#define OVER_RIDE_FOO_IN_DERIVED_C #include "BaseA.h" #include "VirtualBaseD.h" class CDerivedC:public CBaseA, public CVirtualBaseD { public: #ifdef OVER_RIDE_FOO_IN_DERIVED_C virtual void foo(); #endif //... private: //... }; #ifdef OVER_RIDE_FOO_IN_DERIVED_C void CDerivedC::foo() { cout << "This is the foo of Derived Class C" << endl; } #endif #endif