This post was edited and submitted for review 10 hours ago and failed to reopen the post:
Original close reason(s) were not resolved
If I have this below code -
string str;
wstring wstr;
for (char x : str)
{
wstr += x;
}
Is this line wstr += x wrong? Do I need some conversion function to convert char x to wchar_t to be stored in wstr? If yes, which conversion function do I need?
Edit - I have gone through the linked answers, it mentions about converting the array of wchar_t and char -> for that for sure conversion functions are needed but my question specifically asks if a char -> wchar_t would need conversion function
精彩评论