A friend function is a function that participates in the class to pass arguments but is not a class member. Similarly, the object cannot be the friend because it is the instance of the class, but the class can be a friend.
The concept of operator overloading and type conversion makes use of the operator functions. The operator can be overloaded as a friend or member function. Hence, a friend function can be an operator function.
Comments
write a comment