Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ std string to float

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

std::cout << temp << std::endl;
// Output: 0.6
 
PREVIOUS NEXT
Tagged: #std #string #float
ADD COMMENT
Topic
Name
8+6 =