State the important difference between public, private and protected members of aclass
Answers
Answered by
0
hey
Private members cannot be inherited by other classes. Protected membersare the members that can only be used by the member functions and friendsof the class in which it is declared. Theprotected members cannot be accessed by non member functions.Protected members can be inherited by other classes.
Private members cannot be inherited by other classes. Protected membersare the members that can only be used by the member functions and friendsof the class in which it is declared. Theprotected members cannot be accessed by non member functions.Protected members can be inherited by other classes.
Similar questions
Biology,
7 months ago
Physics,
1 year ago
Computer Science,
1 year ago
Biology,
1 year ago
English,
1 year ago