There is a function in the math.h librairy that converts a string to a double but I don't know if it is what you are looking for...
From Borland C++5.0 Help files:
Syntax
#include <math.h>
double atof(const char *s);
long double _atold(const char *s);
Description
Converts a string to a floating-point number.
atof converts a string pointed to by s to double; this function recognizes the character representation of a floating-point number, made up of the following:
An optional string of tabs and spaces
An optional sign
A string of digits and an optional decimal point (the digits can be on both sides of the decimal point)
An optional e or E followed by an optional signed integer
The characters must match this generic format:
[whitespace] [sign] [ddd] [.] [ddd] [e|E[sign]ddd]
atof also recognizes +INF and -INF for plus and minus infinity, and +NAN and -NAN for Not-a-Number.
In this function, the first unrecognized character ends the conversion.
_atold is the long double version; it converts the string pointed to by s to a long double.
The functions strtod and _strtold are similar to atof and _atold; they provide better error detection, and hence are preferred in some applications.
Return Value
atof and _atold return the converted value of the input string.
If there is an overflow, atof (or _atold) returns plus or minus HUGE_VAL (or _LHUGE_VAL), errno is set to ERANGE (Result out of range), and _matherr (or _matherrl) is not called.
Example:
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
float f;
char *str = "12345.67";
f = atof(str);
printf("string = %s float = %f\n", str, f);
return 0;
}
Borland C++ 5.0 Programmer's Guide