[ACCEPTED]-Is it advisable to use strcmp or _tcscmp for comparing strings in Unicode versions?-tchar

Accepted answer
Score: 11

_tcscmp() is a macro. If you define UNICODE it will use 3 wcscmp(), otherwise it will use strcmp().

Note the types 2 TCHAR, PTSTR, etc. are similar. They will be WCHAR and 1 PWSTR if you define UNICODE, and CHAR and PSTR otherwise.

Score: 7

No, you should use _tcscmp . That will resolve 2 to proper function depending upon on your 1 compiler flags.

More Related questions