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