> How can I convert a double to AnsiString?
You can't.
However I assume that what you /really/ want to do is make an
AnsiString contain the textual representation of a double value.
AnsiString has many constructors and one of them takes a double so:
double wibble;
AnsiString wibbleAsAString( wibble );
or
double wibble;
AnsiString wibbleAsAString=wibble;
Note that the reverse operation is provided by the ToDouble() method.
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
> How can I convert a double to AnsiString?
AnsiString has a constructor taking a double. The copy assignment
operator takes an AnsiString.
Thus, you can directly construct it like this:
double dblval = ...;
AnsiString(dblval);
Or you can implicitly convert it:
double dblval = ...;
AnsiString str;
str = dblval;
The 2nd case creates a temporary AnsiString (implicitly) and assigns
that to str.
--
Chris (TeamB);
--
Best regards,
Vladimir Stefanovic
Cristiano de Araujo Resende <cris...@alol.com.br> wrote in message
news:41582b18$1...@newsgroups.borland.com...