#include <sstream>
#include <iomanip>
#include <iostream>
using namespace std;
stringstream Text;
double Somevalue = 9.987654;
Text << Somevalue;
cout << Text.str() << endl;
// TODO: Lookup the iomanip stuff to get the format you want
--
Regards, Ron AF Greve
http://moonlit.xs4all.nl
"utab" <> wrote in message
news: oups.com...
> Hi there,
>
> Is there a way to convert a double value to a string. I know that there
> is fcvt() but I think this function is not a part of the standard
> library. I want sth from the standard if possible.
>
> The thing I am trying to do is to convert a double value to a string
> with 8 elements. 8 is fixed because of the files I work with. I will
> change this 8 character string with the one(8 character string) already
> in the file and so on. But I have to do the conversion first.
>
> Any help will be appreciated,
>
> Thanks in advance.
>