你拥有男人所需要的一切:
姓名
strtod, strtof, strtold - convert ASCII string to floating-point
number
概要
#include <stdlib.h>
double strtod(const char *nptr, char **endptr);
描述
The strtod(), strtof(), and strtold() functions convert the ini‐
tial portion of the string pointed to by nptr to double, float,
and long double representation, respectively.
返回值
These functions return the converted value, if any.
If endptr is not NULL, a pointer to the character after the last
character used in the conversion is stored in the location ref‐
erenced by endptr.
If no conversion is performed, zero is returned and the value of
nptr is stored in the location referenced by endptr.
我发现最后一句话特别有趣。