I want to convert std :: string to std :: wstring. There are two approaches that I have encountered.
Given the string str, we cannot convert it to a wide string using the following code wstring widestring = std :: wstring (str.begin (), str.end ());
Another approach is to use MultiByteToWideCharArray ().
What I wanted to understand was what is the disadvantage of using the first approach and how the second approach solves the issue
source
share