The first snippet (and lines 13-16) are an overload of the + operator, allowing two Cents objects to be added together (see line 22). The values from c2 and c1 are added together and returned in a new object.
BTW, it is not necessary to use the getter getVal() in the overloaded operator. The operator overload has access to private in both c 1 and c2.
In C++, it is possible to define multiple functions with the same name, differing only in terms of their formal parameter list and optionally their return values.
1 2 3 4
int foo(int) {}
int foo(double) {}
int foo() {}
double foo(char) {}
Those functions are called "overloaded", each foo is a particular overload.
Conceptually, an + is just another function -- one with (at least) "implicit" overloads for primitives --- int and double and such. That's not exactly true, but you are regardless overloading the meaning of `+' for another type.
Edit: Actually functions do have a type. The expression &Cents::operator+ has a type of Cents (Cents::*)(Cents&, Cents&).
It's not a member function, and if it was, the signature wouldn't make sense.
The + operator being defined is not a member function of the Cents class. As such, the type is not Cents(Cents::*)(Cents&, Cents&), but Cents(*)(Cents&, Cents&).
Also, because the function is not a member function, the getVal() function IS necessary.