Content deleted Content added
No edit summary |
No edit summary |
||
Line 1:
In [[object-oriented programming]], a '''friend function''', that is a "friend" of a given [[class (computer science)|class]], is a function that is given the same access as methods to private and protected [[data]].
<ref>{{cite book|last=Holzner|first=Steven|title=C++ : Black Book|year=2001|publisher=Coriolis Group|___location=Scottsdale, Ariz.|isbn=1-57610-777-9|page=397|quote=When you declare a function a friend of a class, that
</ref>
A friend function is declared by the class that is granting access, so friend functions are part of
A similar concept is that of [[friend class]].
|