Private members are class members that are hidden from the outside world. The private members implement the OOP concept of data hiding. The private member of a class can be used only by the member functions of the class in which it is declared. Private members cannot be inherited by other classes.
Protected members are the members that can only be used by the member functions and friends of the class in which it is declared. The protected members cannot be accessed by non member functions. Protected members can be inherited by other classes.
You have viewed 1 page out of 62. Your C++ learning is 0.00% complete. Login to check your learning progress.