title: char to LPCTSTR
body: <p>how to convert char to LPCTSTR in vc++</p>
  
  <hr>
  
  <p>I am using MVC. </p>
  
  <pre><code>QByteArray qBary;
  qBary.append(temp);
  char toChar[512];
  for(int ii = 0; ii &lt; 512; ii++)
  { 
      toChar[ii] = qBary[ii];
      if(qBary[ii] == '\0') 
      {
          break;
      }
  } 
  SHFILEOPSTRUCT sf;
  memset(&amp;sf, 0, sizeof(sf)); 
  sf.hwnd = 0;
  sf.wFunc = FO_COPY;
  sf.pFrom = toChar; // error occurring here
  </code></pre>