Use L before wstring wstring wString = L”test”; When you need yo convert wstring to string or char* in C++, just use string wstringChangedToString(wString.begin(), wString.end()); The code shows how to convert and compare wstring to string and string to wstring #include using namespace std; int main(int argc, char **argv) { string stdString = “test”; wstring wString = L”test”; string wstringChangedToString(wString.begin(), wString.end()); if (wstringChangedToString == stdString) { cout