title: How to initialize and print a std::wstring?
body: <p>I had the code:</p>
  
  <pre><code>std::string st = "SomeText";
  ...
  std::cout &lt;&lt; st;
  </code></pre>
  
  <p>and that worked fine. But now my team wants to move to <code>wstring</code>.
  So I tried:</p>
  
  <pre><code>std::wstring st = "SomeText";
  ...
  std::cout &lt;&lt; st;
  </code></pre>
  
  <p>but this gave me a compilation error:</p>
  
  <blockquote>
    <p>Error 1   error C2664:
    'std::basic_string&lt;_Elem,_Traits,_Ax>::basic_string(const
    std::basic_string&lt;_Elem,_Traits,_Ax> &amp;)' : cannot convert parameter 1
    from 'const char [8]' to 'const std::basic_string&lt;_Elem,_Traits,_Ax>
    &amp;'    D:...\TestModule1.cpp  28  1   TestModule1</p>
  </blockquote>
  
  <p>After searching the web I read that I should define it as:</p>
  
  <pre><code>std::wstring st = L"SomeText"; // Notice the "L"
  ...
  std::cout &lt;&lt; st;
  </code></pre>
  
  <p>this compiled but prints <code>"0000000000012342"</code> instead of <code>"SomeText"</code>.</p>
  
  <p>What am I doing wrong ?</p>