title: Counting number of digits in an integer through recursion
body: <p>My code is following:</p>
  
  <p>/counting number of digits in an integer</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int countNum(int n,int d){
      if(n==0)
      return d;
      else
      return (n/10,d++);
  }
  int main(){
      int n;
      int d;
      cout&lt;&lt;"Enter number"&lt;&lt;endl;
      cin&gt;&gt;n;
     int x=countNum();
      cout&lt;&lt;x;
      return 0;
  }
  </code></pre>
  
  <p>i cannot figure out the error,it says that 
  : too few arguments to function `int countNum(int, int)' 
  what is issue?</p>