Reputation: 1
I need to compare two wide character strings in c++.
wchar_t *str1 = L"abc"; wchar_t *str2 = L"abc";
How to compare two wchar_t* variables?
Upvotes: 0
Views: 1403
Reputation: 4529
use wcscmp() to compare wide character strings.
wchar_t *str1 = L"abc"; wchar_t *str2 = L"abc"; if (wcscmp(str1,str2) == 0) cout << "str1 and str2 are Equal";
Upvotes: 4