0

How Public inheritance works?

Okay I know that in public inheritance Everything is inherited as it is in the base class,but I don't understand if a base class private member is inherited by child class as its own private member then why child class member function can't access this private member ? P.S. I'm talking in context of Public inheritance

15th Aug 2019, 10:12 AM
Zuhail
Zuhail - avatar
5 Respuestas
+ 1
~ swim ~ then what does it mean inheriting the private members of base class as childs own private member
15th Aug 2019, 10:24 AM
Zuhail
Zuhail - avatar
+ 1
~ swim ~ thanks I did some practice and i guess it's the rule btw I read that in a book maybe there's misleading information there but I get your point .
15th Aug 2019, 10:36 AM
Zuhail
Zuhail - avatar