Question #323156

how to create simple program using private access modifier?


Expert's answer

Answer: The class members declared as private can be accessed only by the member functions inside the class. They are not allowed to be accessed directly by any object or function outside the class. Only the member functions or the friend functions are allowed to access the private data members of a class. 


LATEST TUTORIALS
APPROVED BY CLIENTS