Varibles question(Floats)

ive been learning sfml lately and ive come across this line of code while learning:
1
2
3
4
const float Speed = 50.f;
float Left = 0.f;
float Top  = 0.f;

What does this mean? im confused on why they add ".f" after each number. Thanks for the help!
The ".f" means it's a float number (a Floating Point number).
If you don't include the f, it will be treated as a double number (a Double-Precision Floating Point number), but it will be converted back to float, and you will get a warning while compiling.
Thank you, the tutorial makes so much more sense now!
Last edited on
Topic archived. No new replies allowed.