C语言判断两个lpcwstr字符串是否相等的方法


1、使用strcmp判断两个lpcwstr字符串是否相等,如果等于0就相等


strcmp((_bstr_t)s1,(_bstr_t)s2);


2、C++ 如何比较两个char*是否相等


int lstrcmp(

LPCTSTR lpString1,

LPCTSTR lpString2

);

If the string pointed to by lpString1 is less than the string pointed to by lpString2, the return value is negative. If the string pointed to by lpString1 is greater than the string pointed to by lpString2, the return value is positive. If the strings are equal, the return value is zero.