title: MFC CString Format gives weird behaviour
body: <p>I am having a weird problem with <code>CString</code> I have the following code which gives an unexpected result:</p>
  
  <pre><code>CString sourcePath = _T("C:\\some\\path\\file.ext");
  CString log;
  log.Format(_T("Path = %s"), sourcePath);
  </code></pre>
  
  <p>the result string shows <code>Path = (null)</code>.</p>
  
  <p>I am not sure what is going on under the hood there, I have tried casting the <code>sourcePath</code> to an <code>LPCTSTR</code> and got a valid pointer and when viewing the content of that memory address in the memory view window of MSVC everything seems valid.</p>
  
  <p>this annoys me as I have tried the same method in previous projects and it worked pretty well.</p>
  
  <p>Thanks.</p>
  
  <p>P.S. Please, before people start commenting here asking about what is a <code>CString</code>, as it happened in an earlier post of mine, please check here first: <a href="http://msdn.microsoft.com/en-us/library/18he3sk6%28v=vs.80%29.aspx" rel="nofollow">MSDN CString</a></p>
  
  <p>Edit: sorry about the slash thingy.. and yes the original code does have double slashes..</p>