title: c++ parse int from string
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/194465/how-to-parse-a-string-to-an-int-in-c">How to parse a string to an int in C++?</a>  </p>
  </blockquote>
  
  
  
  <p>I have done some research and some people say to use atio and others say it's bad, and I can't get it to work anyways.</p>
  
  <p>So I just want to ask flat out, whats the right way to convert a string to a int.</p>
  
  <pre><code>string s = "10";
  int i = s....?
  </code></pre>
  
  <p>Thanks!</p>