string型长串中是小数和空格组成
1 回答

asd8532
TA贡献143条经验 获得超187个赞
小数和空格?你要给出个具体的例子
#include <stdio.h> #include <stdlib.h> int main () { char szOrbits[] ="365.24"; char* pEnd; float f1; f1 = strtof (szOrbits, &pEnd); printf("%f\n",f1); return 0; } //365.239990
- 1 回答
- 0 关注
- 1641 浏览
添加回答
举报
0/150
提交
取消