Answers for "convet strint to float c++"

C++
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