How to compare a wide string with a const char* ???
unsigned short* wideString;
wcscmp(wideString, "myName") won't work!!!! even with casting!
Any help is much much appreciated!!!
Printable View
How to compare a wide string with a const char* ???
unsigned short* wideString;
wcscmp(wideString, "myName") won't work!!!! even with casting!
Any help is much much appreciated!!!
Don't try type-casting!!! All it will do is convince compiler that "myName" is a wide string
which it is not
So convert const char * to wchar * and then use wcscmp.
I don't remember the exact name of the function but I think it starts with mbcs...
Have you tried this:
wcscmp(wideString, L"myName");
The 'L' converts the string to a wide string.
Wayne