0

A inherited class is inherited with private visibilty mode.Can it access the data members and functions of the base class?

13th Sep 2016, 5:59 AM
Sarukrishna
Sarukrishna - avatar
2 Answers
+ 1
The derived class can access the public and protected members of the base class (as usual). The fact that the inheritance is private only means that those inherited members are private in the derived class.
13th Sep 2016, 9:04 AM
Zen
Zen - avatar
- 1
If functions and members of base class are in public or protected section and you will try to use them in public or protected section in inherited class that should work
13th Sep 2016, 8:38 AM
MarcinZx