C++11

// <string>
long double stold (const string& str, size_t* idx = 0);
​long double stold (const wstring& str, size_t* idx = 0);

将字符串转化成浮点数。