What do you mean by friend function discuss with example
Answers
Answered by
9
Answer:
a ʄʀɨɛռɖ ʄʊռċtɨօռ ɨs a ʄʊռċtɨօռ tɦat ɨs sքɛċɨʄɨɛɖ օʊtsɨɖɛ a ċʟass ɮʊt ɦas tɦɛ aɮɨʟɨtʏ tօ aċċɛss tɦɛ ċʟass ʍɛʍɮɛʀs' քʀօtɛċtɛɖ aռɖ քʀɨʋatɛ ɖata. a ʄʀɨɛռɖ ċaռ ɮɛ a ʍɛʍɮɛʀ's ʄʊռċtɨօռ, ʄʊռċtɨօռ tɛʍքʟatɛ, օʀ ʄʊռċtɨօռ, օʀ a ċʟass օʀ ċʟass tɛʍքʟatɛ, ɨռ աɦɨċɦ ċasɛ tɦɛ ɛռtɨʀɛ ċʟass aռɖ aʟʟ օʄ ɨts ʍɛʍɮɛʀs aʀɛ ʄʀɨɛռɖs.
Explanation:
✌✌
Answered by
1
Answer:
A friend function is a function that is specified outside a class but has the ability to access the class members' protected and private data. A friend can be a member's function, function template, or function, or a class or class template, in which case the entire class and all of its members are friends
Similar questions