In C and C++, if the compiler sees an
expression or function call using a type that isn’t quite the one it
needs, it can often perform an automatic type conversion from the type it has to
the type it
wants.
In C++, you can achieve this same effect for user-defined types by defining
automatic type conversion functions. These functions come in two flavors: a
particular type of constructor and an overloaded
operator.