Is there an off-the-wall function to translate "5.6e+4" to "56000"?

Thanks

- 03-27-2008meili100Is there an off-the-wall function to translate "5.6e+4" to "56000"?
Is there an off-the-wall function to translate "5.6e+4" to "56000"?

Thanks - 03-27-2008Doodle77
sscanf. Use the %f type specifer. Be sure to look at the example.

I think you can also do it with a stringstream or something but I'm not sure how. - 03-27-2008swoopyCode:
`double num = 5.6e+4;`

std::cout << std::fixed << num << std::endl;

- 03-28-2008kordric
If thats an output of an equation you have you could also do this. I had the same problem for my program.

Code:`cout.setf(ios::fixed);`

cout.setf(ios::showpoint);

cout.precision(1);

Hope this helps.