# include using namespace std; class A { public: virtual void f() { cout << \"A::f()\" << endl; } }; class B:pu
Your base class is defining the interface for all the inherited children. I do not see why it should prevent the mentioned access. You can try deriving a class down from 'B' and use the Base interface to call , which would result in an error.
Cheers!