int main(){
std::string text = "15555555.2587";
std::stringstream ss;
double number;
ss << text;
ss >> number;
std::cout << std::fixed << std::setw( 11 ) << std::setprecision( 6 )
<< std::setfill( '0' ) << number<<endl;
return 0;
}
Output of the above program is 15555555.0000
it truncates the value after the decimal point.
how do I get the correct value?