不能将参数 1 从“const char [11]”转换为“LPCWSTR”
2017-09-18 11:09
465 查看
原因:该工程是在UNICODE下编程的
解决方法1:选中项目,然后点击属性——>配置属性——>常规——>项目默认值——>字符集,选为“使用多字节字符集"
解决方法2:在字符串前面加上 _T() ,如_T("确定")
解决方法1:选中项目,然后点击属性——>配置属性——>常规——>项目默认值——>字符集,选为“使用多字节字符集"
解决方法2:在字符串前面加上 _T() ,如_T("确定")
相关文章推荐
- VS2010点滴——不能将参数 1 从“const char [11]”转换为“LPCWSTR”
- VS2010点滴——不能将参数 1 从“const char [11]”转换为“LPCWSTR”
- error C2664: “CreateWindowExW”: 不能将参数 2 从“const char [11]”转换为“LPCWSTR”
- VS2010点滴——不能将参数 1 从“const char [11]”转换为“LPCWSTR”
- VS2010点滴——不能将参数 1 从“const char [11]”转换为“LPCWSTR”
- VC编译出现如下错误:错误 1 error C2664: “wsprintfW”: 不能将参数 2 从“const char [6]”转换为“LPCWSTR” e:\c_2008\pra6\pra6\
- 不能将参数 1 从const char [*]转换为LPCWSTR
- error c2664:"MessageBoxW":不能将参数2从“const char[15]”转换为“LPCWSTR”与指向的类型无关
- error C2664: “MessageBoxW”: 不能将参数 2 从“const char [36]”转换为“LPCWSTR”
- C++ 串口编程 错误 ““CreateFileW”: 不能将参数 1 从“const char [5]”转换为“LPCWSTR””
- error C2664: “MessageBoxW”: 不能将参数 2 从“const char [10]”转换为“LPCWSTR”
- VS2010--不能将参数 2 从“const char [12]”转换为“LPCWSTR”与指向的类型无关
- 不能将参数 1 从“const char [17]”转换为“LPCWSTR”
- VS2010--不能将参数 2 从“const char [12]”转换为“LPCWSTR”与指向的类型无关
- error C2664: “CreateMutexW”: 不能将参数 3 从“const char [8]”转换为“LPCWSTR”
- 不能将参数 1 从“const char [8]”转换为“LPCWSTR”
- 不能将参数2从“const char[15]”转换为“LPCWSTR”与指向的类型无关
- 下面的程序在VC6通过,在VS2008不能,错误信息都是“不能将参数……从const char[]转换为LPCWSTR”
- vc 不能将参数 1 从const char [*]转换为LPCWSTR
- VS2010 error C2664: “GetModuleHandleW”: 不能将参数 1 从“const char [10]”转换为“LPCWSTR” 解决方法