We would like to write
Pair p1(2,3); Pair p2(5,5); Pair p3, p4; p3 = p1 + p2; // instead of p1.add(p2) p4 = p1 + 1; // instead of p1.add(1)
Note that the values assigned to p3 and p4 don't change, we are just able to write the operator + instead of the member function add. But the implementation will be the same!
How do you declare and implement an new meaning for an operator. That is, how do you overload an operator?