title: MFC CString to int
body: <p>using this code i get an error at <code>atoi</code>'s conversion from <code>CString</code> to <code>int</code>:</p>
  
  <pre><code>    int nrCentrala; CString idCentrala;
      GetDlgItem(IDC_EDIT_IDCENTRALA)-&gt;GetWindowText(idCentrala);
      nrCentrala = atoi(&amp;idCentrala);
  </code></pre>
  
  <p>where <code>IDC_EDIT_IDCENTRALA</code> is an edit control.</p>
  
  <p><code>Error  7   error C2664: 'atoi' : cannot convert parameter 1 from 'CString *' to 'const char *'
  </code></p>