title: C++:How to convert string into integer without using any built in functions
body: <p>I am trying to convert a string to a integer and carry out some arithmetic after that.</p>
  
  <pre><code>char string[10];
  </code></pre>
  
  <p>If the string has only one word I can do this:</p>
  
  <pre><code>string[0]-'0'
  </code></pre>
  
  <p>How can I convert it into an integer if the string has more than one character.</p>