error C2446: == : no conversion from const char * to TCHAR *

前端 未结 2 556
情深已故
情深已故 2021-01-21 08:55

I have a TCHAR define below:

 TCHAR szProcessName[MAX_PATH] = TEXT(\"\");

and I want to comapare as below:

if(sz         


        
2条回答
  •  时光说笑
    2021-01-21 09:11

    "NDSClient.exe" is a const char* string on windows. If you want it to become a const TCHAR* then you need to use the TEXT macro. Also, you can not compare strings using == use a equivalent TCHAR function such as _tcscmp.

提交回复
热议问题