title: string to double conversion in C++
body: <p>The following function converts a string to a double but the precision is not enough.</p>
  
  <pre><code>double stringToDouble(string s) {
      double d;
      stringstream ss(s); //turn the string into a stream
      ss &gt;&gt; d; //convert
      return d;
  }
  </code></pre>
  
  <p>When called with stringToDouble("31.2458782523") the output is 31.2459.</p>
  
  <p>Without using the Boost libraries is there a way to do this better? I want a higher degree of precision. As high as possible.</p>