Login
Remember
Register
CodersEditor Q&A
Online IDE
Questions
Unanswered
Tags
Users
Ask a Question
Programming Tutorials
Ask a Question
Why do we need the Friend class and function?
0
votes
asked
Jan 20, 2021
by
abitha
(
1.6k
points)
c
Please
log in
or
register
to answer this question.
1
Answer
+1
vote
answered
Jan 20, 2021
by
Inba
(
1.1k
points)
selected
Jan 20, 2021
by
admin
Best answer
Friend functions let you access private data members of the same class but doesn't provide access to any other external classes to access the private members.
Please
log in
or
register
to add a comment.
Welcome to CodersEditor Q&A, where you can ask questions and receive answers from other members of the community.
239
questions
203
answers
2
comments
692
users
Related questions
Can we call C++ OOPS and Why?
What is the main difference between the keyword struct and class?
Can we provide one default constructor for our class?
How do you print the first non-repeated character from a string using c programming?
Is it possible for a C++ program to be compiled without the main() function?
...