Why friend function?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why friend function??

27th Mar 2018, 2:21 PM
Prashant Sholapur
Prashant Sholapur - avatar
2 Answers
0
Cuz it makes two classes friends and allow friend function to have access to their private fields in the same time
28th Mar 2018, 9:11 AM
Maxim Sechenov
Maxim Sechenov - avatar