error C2440: “=”: 无法从“const wchar_t [4]”转换为“LPWSTR”

Posted 胡刚2021

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了error C2440: “=”: 无法从“const wchar_t [4]”转换为“LPWSTR”相关的知识,希望对你有一定的参考价值。

在给ListView添加一列的时候报错

解决办法:
直接进行强制类型转换 (LPWSTR)_T(“第0列”);

colInfo.pszText = (LPWSTR)_T("第0列");

以上是关于error C2440: “=”: 无法从“const wchar_t [4]”转换为“LPWSTR”的主要内容,如果未能解决你的问题,请参考以下文章

error C2440: “=”: 无法从“const wchar_t [4]”转换为“LPWSTR”

error C2440: “static_cast”: 无法从“void (__thiscall CMainFrame::* )

error C2440: "=": 无法从"char *"转换为"LPTSTR" LPTSTR buffer; buffer = new c

error C2440

错误 C2440:“static_cast”:无法从“long”转换为“LRESULT”

错误 C2440:“=”:无法从“const char *”转换为“char *”