如果是VC6用 atof
如果是VS2005或VS2008用 _tstof (单字符集和UNICODE编码都可以用)
CString str = _T("123.456");
//VS2005或VS2008用
double a = _tstof(str);
//VC6用
double b = atof(str);
使用函数
double atof( const char *string );
比如char *s; double m;
m=atof(s );//把s数字字符串转换为double
这是在#include