PDA

View Full Version : might be a stupid question, but...



shishka55
03-01-2005, 05:39 PM
what is with the convention where everyone writes out floating point numbers without decimals as:

{2.,3.,1.}

? C++ takes them without the decimal. Is this some sort of coding standard that everyone follows? Also what about:

{2.0f, 3.5f, 2.5f}

I understand that is indicates a floating point number. But WHY is it used when it just requires more typing?

Thanks...

zukko
03-01-2005, 07:57 PM
afaik if you dont write the f it takes it as a double.