title: Why does passing a std::string to CString.Format() only crash sometimes?
body: <p>Using <code>CString.Format()</code>, I'm passing it a <code>std::map</code> that returns a <code>std::string</code> when given an <code>int</code>.</p>
  
  <p>So:</p>
  
  <pre><code>CString cStr;
  cStr.Format("%s", IntToStdStringMap[1]);
  </code></pre>
  
  <p>where <code>IntToStdStringMap[1]</code> returns some string, we'll say "Hello, World!". The issue is that this doesn't seem to crash every time. Eventually, I'll receive an access violation.</p>
  
  <p>Why might this be?</p>
  
  <p>Keep in mind, that changing the code to the following:</p>
  
  <pre><code>CString cStr;
  cStr.Format("%s", IntToStdStringMap[1].c_str());
  </code></pre>
  
  <p>alleviates the issue. </p>
  
  <p>Any ideas?</p>