C++ · Functions

Default arguments and overloading

The standard library's abs works on both int and double, and the same two features let your own functions do that.