title: How to convert from ASCII to INT
body: <p>I have a string &quot;a&quot; with numbers on it (e.g &quot;I have 4 apples&quot;) and I'm trying to get the number &quot;4&quot; into an int variable without it giving me the ASCII code, in this case &quot;52&quot;(ASCII 4 is 52).</p>
  <p>I have tried <code>int y = (int)a[8]</code> but it doesn't work.</p>