title: Function returns wrong value
body: <p>It's a program that uses recursion to convert string to int<br>
  The code always outputs 17 when it's supposed to output 1234<br>
  and when I add a digit to that number it adds 1 to that output<br>
  for example if it's supposed to output 12345 it outputs 18</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int convertToInteger(string numberStr)
  {
      if (numberStr.size()==0)  return result;
      convertToInteger (numberStr);
  }
  
  int main(int argc, char *argv[])
  {
      string numberStr("1234");
      cout &lt;&lt; numberInt &lt;&lt; endl;
      return 0;
  }
  </code></pre>