猿问
如下提示错误,为什么不能使用 atoi()函数?
语句: p1->price = atof(str.c_str());
错误:error:'atof' was not declared in this scope
米脂
浏览 69
回答 2
2回答
互换的青春
_atof_l()
0
0
0
FFIVE
atoi atof是c语言提供的一个扩展功能,它能将一个字符串转换成对应的float或者integer。使用这些函数时,必须引入头文件#include <stdlib.h>
0
0
0
随时随地看视频
慕课网APP
相关分类
C++
typedef入门问题
1 回答
我要回答