tags:

views:

75

answers:

1

I have a double value which I receive from an application. I am trying to push onto the string stream object.

For ex: if the value of varialbe is 1000000, while pushing on to the string stream, it gets pushed as 1e+06. Whats the most elegant way to convert this to string which I can use as "1000000" and not as "1e+06"

+5  A: 

Using io manipulators. See the link for example usage.

grddev
fixed along with str.precision worked. Thanks.
Jitesh Dani
@Jitesh: is there a particular reason you didn't accept the answer?
grddev