// File: main2.C // // Testing access to inherited members under private derivation. #include #include #include #include "pd.h" void foo1(Base& b) { b.add1() ; } void foo2(Base* ptr) { ptr->add1() ; } main() { PrivDer P ; P.print() ; foo1(P) ; P.print() ; foo2(&P) ; P.print() ; }