L
Leslaw Bieniasz
Cracow, 20.09.2004
Hi,
I want to replace:
char *text;
double val = strtod(text,NULL);
by an equivalent using std::string in the place of char *.
The construct:
std::string text;
double val = strtod(text.c_str(),NULL);
works, but isn't there any more elegant possibility,
specifically suited for std::string ?
Sincerely,
L.B.
*-------------------------------------------------------------------*
| Dr. Leslaw Bieniasz, |
| Institute of Physical Chemistry of the Polish Academy of Sciences,|
| Department of Electrochemical Oxidation of Gaseous Fuels, |
| ul. Zagrody 13, 30-318 Cracow, Poland. |
| tel./fax: +48 (12) 266-03-41 |
| E-mail: (e-mail address removed) |
*-------------------------------------------------------------------*
| Interested in Computational Electrochemistry? |
| Visit my web site: http://www.cyf-kr.edu.pl/~nbbienia |
*-------------------------------------------------------------------*
Hi,
I want to replace:
char *text;
double val = strtod(text,NULL);
by an equivalent using std::string in the place of char *.
The construct:
std::string text;
double val = strtod(text.c_str(),NULL);
works, but isn't there any more elegant possibility,
specifically suited for std::string ?
Sincerely,
L.B.
*-------------------------------------------------------------------*
| Dr. Leslaw Bieniasz, |
| Institute of Physical Chemistry of the Polish Academy of Sciences,|
| Department of Electrochemical Oxidation of Gaseous Fuels, |
| ul. Zagrody 13, 30-318 Cracow, Poland. |
| tel./fax: +48 (12) 266-03-41 |
| E-mail: (e-mail address removed) |
*-------------------------------------------------------------------*
| Interested in Computational Electrochemistry? |
| Visit my web site: http://www.cyf-kr.edu.pl/~nbbienia |
*-------------------------------------------------------------------*