Dynamic Drive Forums
>
General Coding
>
Other
> Parsing Doubles in C++
PDA
View Full Version :
Parsing Doubles in C++
Trinithis
08-28-2007, 07:43 PM
How can I parse a double from a char or a string in C++?
Twey
08-28-2007, 08:08 PM
#include <cstdlib>
// ...
double dbl = strtod(cptr, NULL);
dbl = strtod(str.c_str(), NULL);
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.