In the example using class adds, friend function can be used in the place of member function to overload the binary operator +. The difference is that the friend function requires two arguments while the member function requires only one. In the example using class adds, the member function declaration can be replaced by the friend function declaration as shown. The function definition has to be replaced as shown.

