Expand|Select|Wrap|Line Numbers
- 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";