what is friend function in c++

A friend function is a function that is not a member of a class but has access to the class's private and protected members

139 Views|Posted 2011-12-07 21:21:29
Started by Saba
1 Comment
P.Mishra
2011-12-07 22:04:10
Friend functions are not considered class members; they are normal external functions that are given special access privileges. Friends are not in the class's scope, and they are not called using the member-selection operators (. and –>) unless they are members of another class. A friend function is

...Read more

Thumbs Up IconUpvote Thumbs Down Icon

Taking an Exam? Selecting a College?

Get authentic answers from experts, students and alumni that you won't find anywhere else.

On Shiksha, get access to

67K
Colleges
|
1.1K
Exams
|
7.2L
Reviews
|
1.9M
Answers

Share Your College Life Experience

Didn't find the answer you were looking for?

Search from Shiksha's 1 lakh+ Topics

or

Ask Current Students, Alumni & our Experts

Have a question related to your career & education?

or

See what others like you are asking & answering