Re: [ROOT] Converting numbers to strings

From: Arnau Robert (
Date: Thu Jul 15 2004 - 10:05:12 MEST

Hi Stilianos

       strtod, strtof, strtold - convert ASCII string to floating
       point number

       #include <stdlib.h>

       double strtod(const char *nptr, char **endptr);
       float strtof(const char *nptr, char **endptr);
       long double strtold(const char *nptr, char **endptr);

       The strtod, strtof, and strtold functions convert the ini­
       tial  portion  of the string pointed to by nptr to double,
       float, and long double representation, respectively.

I don't know if this feature is implemented in TString 

> Stilianos Kesisoglou wrote:

> Hi,
> Is there any way that I can convert a number into a string in ROOT?
> For example in Visual Basic one can write:
>         Dim a as Single
>         Dim str_a as String
>         a=3.141592654
>         str_a = CStr(a)
> and str_a is the string "3.141592654"
> Thanks!
> Stelios.

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET