Access the private Members Functions of a class In C++
Private members can be accessed from within the class members only
The private items of a family can be used by its members only.
C++ Program How to Access the private members function of a class
Welcome in bbc
Explanation of the program
Here private member
function kbc() cannot be accessed outside the class. Hence if the class
object 's' tries to access
kbc() then an error is obtained.
It is accessed by another member
function bbc() of the same class. In this case, we do not obtain any error.
© 2016-2019, Codeverb.com - All Rights Reserved