Why use MultiByteToWideCharArray to convert std::string to std::wstring?
<p>I want to convert a std::string to std::wstring. There are two approaches which i have come across.</p>

<ol>
<li><p>Given a string str we cant convert into wide string using the following code
wstring widestring = std::wstring(str.begin(),str.end());</p></li>
<li><p>The other approach is to use MultiByteToWideCharArray().</p></li>
</ol>

<p>What i wanted to understand was what is the drawback of using the first approach and how does the second approach solves thing problem</p>
