Answers for "how to safely turn int to float in cpp"

C++
4

int to float c++

int a = 3;
float b = (float)a;
Posted by: Guest on February-28-2020
0

float to int c++

float var_a = 9.99;
int   var_b = (int)var_a;
Posted by: Guest on December-26-2021

Browse Popular Code Answers by Language