1.f is a valid float.
It is not the same as 1.0, because 1.f is a float and 1.0 is a double. 1.0 is a double because double is the C/C++ default floating-point type. 1.d is a double.
For a lot more detail, see: http://www.cplusplus.com/doc/tutorial/constants/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment