Finally, you can use C style casts, but these are provided only so that you can compile legacy code. You should use one of the C++ casts instead. For completeness, the C style casts are shown here:
double pi = 3.1415; float f1 = (float)pi; float f2 = float(pi);
There are two versions: the first cast operator has the parentheses around the type to cast to, and in the second one the cast looks like a function call. In both cases, it would be better to use static_cast so that there is compile-time checking.