社区
VC.NET
帖子详情
error C2664: “strtol”: 不能将参数 1 从“CString”转换为“const char *”
sadchange
2008-03-16 06:05:35
text=strtol(m_recieve,NULL,16);
其中text为long型,m_recieve为CString型。
为什么会出现这样的错误呢?
请高手指教!
...全文
193
2
打赏
收藏
error C2664: “strtol”: 不能将参数 1 从“CString”转换为“const char *”
text=strtol(m_recieve,NULL,16); 其中text为long型,m_recieve为CString型。 为什么会出现这样的错误呢? 请高手指教!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
sadchange
2008-03-16
打赏
举报
回复
谢谢你了!
真相重于对错
2008-03-16
打赏
举报
回复
wcstol(
VC2008:
error
C2664
: ....
不能
将
参数
1 从“C
String
”
转换
为“
const
char
*”
出现:
error
C2664
: ....
不能
将
参数
1 从“C
String
”
转换
为“
const
char
*” 错误 解决:打开项目属性窗口中 ,常规->使用多字节字符集,改为‘使用多字节字符集’.
error
C2664
: '
strtol
' : cannot convert parameter 1 from 'C
String
' to '
const
char
*'
text=
strtol
(m_recieve,NULL,16);...
error
C2664
: ‘
strtol
’ : cannot convert parameter 1 from ‘C
String
’ to ‘
const
char
*’ 解决办法: 改成text=wcstol(m_recieve,NULL,16); 功能:
转换
...
MFC中用atof函数时出现“
Error
:不存在从C
String
到
const
char
的适当
转换
函数”解决方法
原型:double atof(
const
char
*
string
); ASCII to float 作用:将字符串转为双精度浮点数double类型 atof() 的名字来源于 ascii to floating point numbers 的缩写,它会扫描
参数
str字符串,跳过前面的空白...
字符集问题(Unicode变为多字节即能解决)
严重性 代码 说明 项目 文件 行 禁止显示状态 错误
C2664
“void ATL::C
String
T<w
char
_t,StrTraitMFC<...::Format(UINT,...)”: 无法将
参数
1 从“
const
char
[3]”
转换
为...
c++ 结构体地址
转换
成ulong_VC++常用数据类型及其操作
转换
详解
类似的函数列表:_CRTIMP int __cdecl atoi(
const
char
*);_CRTIMP double __cdecl atof(
const
char
*);_CRTIMP long __cdecl atol(
const
char
*);_CRTIMP long double __cdecl _atold(
const
char
*);_CRTIMP __int64...
VC.NET
7,539
社区成员
27,671
社区内容
发帖
与我相关
我的任务
VC.NET
.NET技术 VC.NET
复制链接
扫一扫
分享
社区描述
.NET技术 VC.NET
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章