I have looked at quite a few places online and can\'t seem to find a good explanation as to why we should append an F or L after a value assigned to a C++ constant.
When there is a literal value it is considered to be of a certain type. 3.0 is considered a double 3 is considered an int. 3.0F makes it in to a float instead of a double 3.0L makes it a long double instead of a double. 3L is a long int instead of an int.
Note at least in g++, and VS08 both of your examples work just fine.