I am trying to convert char to wchar , but its not working !!the else case always executed in this code
char p[500];
while(getline(inFile1, line))
{
//we read p from file that contain only one word "why"............for testing
strcpy_s(p, 500, line.c_str());
string search = p;
const size_t newsize = 100;
size_t origsize = strlen(search.c_str()) + 1;
size_t convertedChars = 0;
wchar_t wcstring[newsize];
mbstowcs( wcstring, search.c_str(), newsize);
wcscat_s(wcstring, L" (wchar_t *)");
if(wcstring == L"why")
cout<<"Right conversion";
else
cout<<"Wrong conversion";