[英]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.