Technical Discussion :: C++

9. How can we access private members of a classs?


By using a friend function.
A friend function has access to all private and protected members of the class for which it is a friend.

Asked In :: TCS iGate Virtusa Syntel Inc. Accenture

Post Your Answer Here:

Name *
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here