Hello there, I've written a C++ function 'stod', which converts a C++ string to a double ...
You're free to use this code for EVERYTHING you want ...
There's only one thing which I'm not appreciating:
It's not allowed to sell this source code to anyone !
The usage is simple:
double dbl;
string test = "25.23";
dbl = stod(test); /* We convert the string to a real double */
If you pass a string which can't be turned into a number, the function's output is always '0' ...
As you maybe already have found out (is this grammatically correct?) the function's name is inspired by the C-function 'atoi' ...
Hope you find this code useful !!!
P.S.: Sorry if my English is bad, my native language is Dutch ...