Answer Posted / mital
A friend function is used in object-oriented programming to
allow access to private or protected data in a class from
outside the class. Normally a function which is not a
member of a class cannot access such information; neither
can an external class. Occasionally such access will be
advantageous for the programmer; under these circumstances,
the function or external class can be declared as a friend
of the class using the friend keyword. The function or
external class will then have access to all information –
public, private, or protected – within the class.
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Why do we use class?
How to use CMutex, CSemaphore in VC++ MFC
What is persistence in oop?
How to hide the base class functionality in Inheritance?
what's the basic's in dot net
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is polymorphism explain?
2. Give the different notations for the class.\
class type to basic type conversion
Get me a number puzzle game-program
Which type does string inherit from?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What is the main purpose of inheritance law?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
Is data hiding and abstraction same?