b*d 发帖数: 75 | 1 in c++. i've used sstream, atof, strtod, none of them give me good precision
eg. 112.84375->112.844
haven't try sprintf but i guess it's the same.
i've also tried >>std::setprecios(20) and it doesn't help. the output
container is declared to double.
any idea how to keep the precision in the string? perhaps i have to use
boost lexical cast... | y*******g 发帖数: 6599 | 2
precision
try <<
【在 b*d 的大作中提到】 : in c++. i've used sstream, atof, strtod, none of them give me good precision : eg. 112.84375->112.844 : haven't try sprintf but i guess it's the same. : i've also tried >>std::setprecios(20) and it doesn't help. the output : container is declared to double. : any idea how to keep the precision in the string? perhaps i have to use : boost lexical cast...
| b*d 发帖数: 75 | 3 lol, thx.
【在 y*******g 的大作中提到】 : : precision : try <<
|
|