If you specify more than one definition for a function name or an operator in the same scope, you have overloaded that function name or operator. Overloaded functions and operators are described in Overloading functions (C++ only) and Overloading operators (C++ only), respectively.
An overloaded declaration is a declaration that had been declared with the same name as a previously declared declaration in the same scope, except that both declarations have different types.
They are syntactic sugar for equivalent function calls; ex:
class X {
//...
public:
//...
};X add(X, X); //a top-level function that adds two X's
X mul(X, X); //a top-level function that multiplies two X's
X f(X a, X b, X c)
{
return add(add(mul(a,b), mul(b,c)), mul(c,a));
}
Now merely replace `add' with `operator+' and `mul' with `operator*':
X operator+(X, X); //a top-level function that adds two X's
X operator*(X, X); //a top-level function that multiplies two X's
X f(X a, X b, X c)
{
return a*b + b*c + c*a;
}