Friend function: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit
Undid revision 848767235 by 157.49.56.23 (talk) two different class > two different classes
Line 8:
 
==Use cases==
This approach may be used in friendly function when a function needs to access private data in objects from two different classclasses.
This may be accomplished in two similar ways
*a function of global or [[namespace]] scope may be declared as friend of both classes