explain friend function with example
Answers
Answered by
1
Hello mate
Here is your answer
.. A friend can be a function, function template, or member function, or a class or class template, in which case the entire class and all of its members are friends.
if you like this answer thank me or follow me
nice to answer you mate
bye
Answered by
5
Answer:
A friend function of a class is defined outside that class scope but it has the right to access all private and protected members of the class.
Note : Here the word class is a word which we use in 'C++' which is a computer language.
Similar questions
Math,
3 months ago
History,
3 months ago
Physics,
3 months ago
Political Science,
6 months ago
English,
6 months ago
Social Sciences,
1 year ago