繁体   English   中英

表达式必须是C ++中的整数或无作用域枚举类型?

[英]Expression must be integral or unscoped enum type in C++?

这是我的代码:

CString fontroute = me32.szExePath + L"Exo-Regular.ttf";

出于某种原因,Visual Studio 2017突出显示了L并说"Expression must be integral or unscoped enum type"

me32.szExePath的类型为char* 您不能在其中添加( +wchar_t -Array( L"foobar" )。

me32.szExePath构造一个临时CString

CString fontroute = CString{ me32.szExePath } + L"Exo-Regular.ttf";

它应该工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM