Regarding inheritance: if you have a Base class A, and class B: public A
You inherit all members of class A, however you can only use the ones declared as public or protected? But you also inherit the private members? What is that for if you can't use them?
if you could use private members, then in order to get access to private members of base class you only should write class that derives from your base class and the idea of member functions and friend functions would be mindless.....
also when you write class B:public A then you inherit interface of class A...interface of class A is its public part.......
i recommend you to read Stroustroup 3-rd edition book chapter 12....it is about inheritance of classes....