[ACCEPTED]-Is it advisable to use strcmp or _tcscmp for comparing strings in Unicode versions?-tchar
Accepted answer
_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.
No, you should use _tcscmp
. That will resolve 2 to proper function depending upon on your 1 compiler flags.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.