title: wcout does not output as desired
body: <p>I've been trying to write a C++ application for a project and I ran into this issue. Basically:</p>
  <pre><code>class OBSClass
  {
  public:
      wstring ClassName;
      uint8_t Credit;
      uint8_t Level;
      
      OBSClass() : ClassName(), Credit(), Level() {}
      OBSClass(wstring name, uint8_t credit, uint8_t hyear)
      : ClassName(name), Credit(credit), Level(hyear)
      {}
  };
  </code></pre>
  <p>In some other file:</p>
  <pre><code>vector&lt;OBSClass&gt; AllClasses;
  ...
  AllClasses.push_back(OBSClass(L&quot;Bilişim Sistemleri Mühendisliğine Giriş&quot;, 3, 1));
  AllClasses.push_back(OBSClass(L&quot;İş Sağlığı ve Güvenliği&quot;, 3, 1));
  AllClasses.push_back(OBSClass(L&quot;Türk Dili 1&quot;, 2, 1));
  ... (rest omitted, some of entries have non-ASCII characters like 'ş' and 'İ')
  </code></pre>
  <p>I have a function basically outputs everything in <code>AllClasses</code>, the problem is wcout does not output as desired.</p>
  <pre><code>void PrintClasses()
  {
      for (size_t i = 0; i &lt; AllClasses.size(); i++)
      {
          wcout &lt;&lt; &quot;Class: &quot; &lt;&lt; AllClasses[i].ClassName &lt;&lt; &quot;\n&quot;;
      }
  }
  </code></pre>
  <p>Output is 'Class: Bili' and nothing else. Program does not even tries to output other entries and just hangs. I am on windows using G++ 6.3.0. And I am not using Windows' cmd, I am using bash from mingw, so encoding will not be problem (or isn't it?). Any advice?</p>
  <p>Edit: Also source code encoding is not a problem, just checked it is UTF8, default of VSCode</p>
  <p>Edit: Also just checked to find out if problem is with string literals.</p>
  <pre><code>wstring test;
  wcin &gt;&gt; test;
  wcout &lt;&lt; test;
  </code></pre>
  <p>Entered some non-ASCII characters like 'ö' and 'ş', it works perfectly. What is the problem with wide string literals?</p>
  <p>Edit: Here you go</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  vector&lt;wstring&gt; testvec;
  
  int main()
  {
      testvec.push_back(L&quot;Bilişim Sistemleri Mühendisliğine Giriş&quot;);
      testvec.push_back(L&quot;ıiÖöUuÜü&quot;);
      testvec.push_back(L&quot;☺☻♥♦♣♠•◘○&quot;);
      for (size_t i = 0; i &lt; testvec.size(); i++)
          wcout &lt;&lt; testvec[i] &lt;&lt; &quot;\n&quot;;
      return 0;
  }
  </code></pre>
  <p>Compile with G++:
  g++ file.cc -O3</p>
  <p>This code only outputs 'Bili'. It must be something with the g++ screwing up binary encoding (?), since entering values with <code>wcin</code> then outputting them with <code>wcout</code> does not generate any problem.</p>