What is a friend function 2024?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at Microsoft, Lives in Redmond, WA
In object-oriented programming, a friend function, that is a "friend" of a given class, is a function that is given the same access as methods to private and protected data. A friend function is declared by the class that is granting access, so friend functions are part of the class interface, like methods.
2023-05-13 05:47:17
评论(499)
Helpful(122)
Helpful
Helpful(2)

Gabriel Wilson
QuesHub.com delivers expert answers and knowledge to you.
In object-oriented programming, a friend function, that is a "friend" of a given class, is a function that is given the same access as methods to private and protected data. A friend function is declared by the class that is granting access, so friend functions are part of the class interface, like methods.