Answered Questions

  • What is friend function?

    Purbita Biswas

    • Oct 8th, 2011

    A friend function is a function that is not a member of a class but has access to the private and protected members of the class. A friend declaration can be placed anywhere in the class declaration. ...

    suganyayaso

    • Mar 13th, 2009

    A friend function is used for accessing the non-public members of a class. A class can allow non-member functions and other classes to access its own private data, by making them friends. Thus, a friend function is an ordinary function or a member of another class.