>As an old style programmer I've been casting values with the C-syntax like:
>float fVal = (float) dVal;
>but now I've been told that the C++ syntax should do a better job
>float fVal = static_cast <float>(dVal);
>for some reason. Is this true? Will the C++ compiler really generate
>different (better?) code or is it simply more writing I have to do?
The compiler is unlikely to do anything different in that case, but it
is safer to use the new style casts for a variety of reasons
1. static_cast is fairly mild in what you're able to do with it, the
compiler will moan if you're doing something naughty.
2. The new casts are quite specific in what they do.
3. You can search for them easier in source code.