title: TCHAR [ ] convert to String
body: <p>I want to convert the <code>TCHAR nameBuf[]</code> into <code>string</code>.</p>
  
  <pre><code>TCHAR nameBuf[MAX_COMPUTERNAME_LENGTH + 2];
  
  DWORD nameBufSize;
  
  nameBufSize = sizeof nameBuf - 1;
  
  GetComputerName(nameBuf, &amp;nameBufSize); //store computer name into nameBuf
  
  _tprintf(_T("%s"), nameBuf); //print the computer name
  </code></pre>