Hi I would like to know what is the difference between these two forms of type casting:
float flt=2.33; int x; x=static_cast<int> flt;
and
x=(int)flt;
The static_cast is a C++ style cast whereas the () cast inherits from C. Try to use static_cast over the C cast as it is more reliable in terms of providing compile time errors in your cast instead of just letting the compiler ignore fatal bugs.