error C2664
来源:互联网 发布:最好的网络在线投资 编辑:程序博客网 时间:2024/05/16 00:59
error C2664: ‘MessageBoxW’ : cannot convert parameter 2 from ‘const char *’ to ‘LPCWSTR’ Types pointed to are unrelated;conversion requires reinterpret_cast, C-style cast orfunction-style cast
这个错误困扰勒我好久
错误的原因只是由于编译器缺省打开UNICODE选项,而上面代码中MessageBox的第二个参数取的是ANSI的字符串,所以出错.
解决办法是:在工程属性设置页面里,在General选项中,将CharSet设置为Use Multi-Byte Character
重新编译,通过
- error C2664
- error C2664
- ERROR C2664
- error C2664:
- error C2664
- error C2664
- error C2664,error C2039
- VC2005 error C2664
- error C2664 c++
- error C2664: “MessageBoxW”解决方案
- error C2664-----STL学习
- error C2664-----STL学习
- error C2664的解决方法
- 关于error C2664
- error C2664: 'LoadImageW'
- Error C2664 解决方法
- VS2008 出现 error C2664
- error C2664: “MessageBoxW”解决方案
- messagequeue(消息队列)
- SCJP认证套题解析之二
- 你是聪明的人还是智慧的人呢?
- JavaScript中变量作用域问题
- TripleDES加密、解密算法
- error C2664
- js用FileSystemObject 对象实现文件控制
- 数据库重放
- GB2312和BIG5,Unicode/UTF8等编码之间的互相转化
- 颜色代码表------取色工具
- ExtJs + DWR + Spring
- BSS段、数据段、代码段、堆与栈
- VC 实现 汉字 GBK(GB2312) 转化为 UTF8 编码
- MySql 开启SQL文log追踪