title: C++ Convert string to TCHAR*
body: <p>Below is my code :</p>
  
  <pre><code>string szDllPath = "12345";
  size_t size = szDllPath.length();
  TCHAR* wArr = new TCHAR[size];
  for (size_t i = 0; i &lt; size; ++i)
      wArr[i] = _T(szDllPath[i]);
  
  cout&lt;&lt;szDllPath&lt;&lt;endl;
  cout&lt;&lt;wArr&lt;&lt;endl;
  </code></pre>
  
  <p>And I get this :</p>
  
  <p><a href="https://i.stack.imgur.com/FrzMo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FrzMo.png" alt="enter image description here"></a></p>
  
  <p>I don't understand why I get the extra characters, and how to solve it ?</p>