您的位置: 首页 > IT文章 > 字符串转换成float和double类型 字符串转换成float和double类型 分类: IT文章 • 2022-05-10 15:17:14 char **endptr); float strtof(const char *nptr, char **endptr); long double strtold(const char *nptr, char **endptr); #include <stdlib.h> int main() { char *str = "1.1"; printf("%f ", strtof(str, NULL)); return 0; }