title: Locale-independent "atof"?
body: <p>I'm parsing GPS status entries in fixed NMEA sentences, where fraction part of geographical minutes comes always after period. However, on systems where locale defines comma as decimal separator, <strong>atof</strong> function ignores period and whole fraction part.</p>
  
  <p>What is the best method to deal with this issue? Long/latitude string in stored in character array, if it matters.</p>
  
  <p><strong>Example Code:</strong></p>
  
  <pre><code>m_longitude = atof((char *)pField); 
  </code></pre>
  
  <p>Where </p>
  
  <pre><code>pField[] = "01000.3897"; 
  </code></pre>
  
  <p>Cross-platform project, compiled for Windows XP and CE.</p>
  
  <p><strong>Comment to solution:</strong></p>
  
  <p>Accepted answer is more elegant, but <a href="https://stackoverflow.com/questions/1333451/c-locale-independent-atof/1333534#1333534">this</a> answer (and comment) is also worth knowing as a quick fix</p>