Answers for "to float convert c++"

C++
2

int to float c++

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

c++ std string to float

std::string num = "0.6";
double temp = ::atof(num.c_str());

std::cout << temp << std::endl;
// Output: 0.6
Posted by: Guest on February-27-2021

Browse Popular Code Answers by Language