Bloomberg LP Interview Question
Financial Software Developersif u r inheriting with private access level u cant access any of the public variables or functions ,and the private members can never be inherited as well.ie, u cant access anything.
You can't access the public or protected members of the base class using the object of the derived class. But, you can definitely access the public and private members of the base class from the member functions of the derived class.
And yes the private members of the base class can never be inherited. If you still want to inherit them then declare the same in the protected area.
Private members can never be inherited
- DashDash July 16, 2010