title: std::string to float or double
body: <p>I'm trying to convert <code>std::string</code> to <code>float/double</code>.
  I tried:</p>
  
  <pre><code>std::string num = "0.6";
  double temp = (double)atof(num.c_str());
  </code></pre>
  
  <p>But it always returns zero. Any other ways?</p>