Computer Science, asked by SumitBattan7614, 1 year ago

Example of a friend function in c++

Answers

Answered by singhjaspal8456
0

A friend function in C++ is defined as a function that can access private, protected and public members of a class. The friend function is declared using the friend keyword inside the body of the class. Friend Function Syntax: class className { ... .. ... friend returnType functionName(arguments).

Similar questions