title: Convert string element to integer C++
body: <p>i have a string of numbers, and i want to multiply these numbers</p>
  
  <pre><code>string myS = "731671765313";
  int product = 1;
      for(int i = 0; i&lt;myS.length(); i++)
          product *= myS[i];
  </code></pre>
  
  <p>How to convert the string element to int because the result is totally wrong.
  I tried casting it to <strong>int</strong> but in vain.</p>