title: Stack overflow caused by recursive function
body: <p>I'm a beginner in C++. Yesterday I read about recursive functions, so I decided to write my own. Here's what I wrote:</p>
  <pre><code>int returnZero(int anyNumber) {
      if(anyNumber == 0)
          return 0;
      else  {
          anyNumber--;
          return returnZero(anyNumber);
      }
  }
  </code></pre>
  <p>When I do this: <code>int zero1 = returnZero(4793);</code>, it causes a stack overflow. However, if I pass the value 4792 as the argument, no overflow occurs.</p>
  <p>Any ideas as to why?</p>