atof
来自cppreference.com
< cpp | string/byte
语法:
#include <cstdlib> double atof( const char *str );
函数 atof() 将 str 转换为双精度浮点数,然后返回此数。star必须以一有效的数字开头,但是除了"E"或者"e"还可以以任何非数字字符结尾。例如,
x = atof( "42.0 is the answer" );
结果x将被设置为 42.0.
相关主题: atoi, atol, c/io/sprintf, strtod