C++: Convert int to float

Hi, I just wanted to know how to convert int to float in c++. The only information about conversions of variables I found was this link. link text But there they only convert FString to another variable.

1 Like

Ok, thx I didn’t think I would be this easy.

Usinc C style cast:

(float)yourint

Using C++ 11 cast:

float(yourint)

I recommend you the second one.

4 Likes