I think its because the base class data members and methods wont be accessible , but I\'d like some more clarity on this. Also, is this the reason why polymorphism (using vi
If I'm right, you are asking about the elements visibility inside a class. As you stated public/protected/private will influence the accessibility of your members/functions members/methods. (see Difference between private, public, and protected inheritance) However polymorphism is not restricted to public inheritance.
example:
class B
{
protected:
virtual void do_B() = 0;
};
class A : protected B
{
virtual void do_B() {};
};