C++: Convert int to float

Usinc C style cast:

(float)yourint

Using C++ 11 cast:

float(yourint)

I recommend you the second one.

5 Likes