string a float c++ code example
Example 1: how to make a float in C++
public float whatYourFloatIsCalled = 0;
public float whatIsYourFloat;
Example 2: c++ std string to float
std::string num = "0.6";
double temp = ::atof(num.c_str());
std::cout << temp << std::endl;
// Output: 0.6