Listing 2
#include "f1.H" int DoSomething( A *pa) { // Cannot replace get_val with A::get_val DoSomethingElse(pa->get_val()); } <file f1.C> class A { int i; public: A(): i(0) {}; ~A() {}; virtual int get_val() { return i; }; }; < file f1.H> #include "f1.H" class B: public A { int j; public: B(): j(0) {}; ~B() {}; virtual int get_val() { return j+2; }; }; <file f2.C>