首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

C++ 字符变换cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'

2012-12-19 
C++ 字符转换cannot convert parameter 2 from const char [23] to LPCWSTRcannot convert parameter

C++ 字符转换cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'

这个问题的解决  VS2005

1   Change your project configuration to use multibyte strings. Press ALT+F7 to open the properties, and navigate to Configuration Properties > General. Switch Character Set to "Use Multi-Byte Character Set".
  2  Indicate that the string literal, in this case "Hello world!" is of a specific encoding. This can be done through either prefixing it with L, such as L"Hello world!", or surrounding it with the generic _T("Hello world!") macro. The latter will expand to the L prefix if you are compiling for unicode (see #1), and nothing (indicating multi-byte) otherwise.

第一个可以   项目  属性 配置属性  常规  字符集  使用多字符集

热点排行