classes friend | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

classes friend

why we need friend class if we can pass values to the members of private through public?

24th Sep 2016, 6:27 PM
Muhammad Yasir Khan
Muhammad Yasir Khan - avatar
1 Answer
- 3
if we want to share private members in another class we use friend keyword .
29th Sep 2016, 2:45 PM
Mohd Zaki
Mohd Zaki - avatar