I\'ve heard that the static_cast function should be preferred to C-style or simple function-style casting. Is this true? Why?
static_cast
static_cast, aside from manipulating pointers to classes, can also be used to perform conversions explicitly defined in classes, as well as to perform standard conversions between fundamental types:
double d = 3.14159265; int i = static_cast(d);