say I have a string as such (I am actually getting this value from somewhere else)
std::string val = "2.31";
Now I am doing something like this
float f = atof(val);
Now f has something like 2.31xxxxxxxxxxx
any suggestion on how I could just get two places after the decimal point ? such that f looks like 2.3100000...