title: unable to print string value using sprintf in c++
body: <p>i have function that takes two parameters of type LPTSTR, and i am trying print both the values using sprintf like below and i am not able to print the exact values.</p>
  
  <pre><code>int __stdcall Logon(LPTSTR UserName, LPTSTR Password)
  {
    char Buffer[2048];
    sprintf(Buffer,"UserName: %s\n m_Password: %s\n",UserName,Password);
    FILE *Ls=fopen("lo.log",a);
    fprintf(Ls,Buffer);
    fclose(Ls);
  }
  </code></pre>