title: Problem with using recursion in a boolean operator
body: <p>I'm new to coding in c++. In this piece of code I'm trying to write function isPalindrome through recursion, however this error pops out:</p>
  <pre class="lang-none prettyprint-override"><code>/Users/peixin.yu/Desktop/code/palindrome.cpp:14:6: error: no matching function for call to 'isPalindrome'
  if (isPalindrome(strn.substr(1,strn.length()-2)))
  </code></pre>
  <p>I'm probably making a silly mistake here, can someone please help me out?</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  bool isPalindrome(int n);
  
  int main(){
      string res = isPalindrome(12321) ? &quot;true&quot; : &quot;false&quot;;
      cout&lt;&lt;res;
  }
  
  bool isPalindrome(int n){
      string strn = to_string(n);
      if (isPalindrome(strn.substr(1,strn.length()-2)))
      {
          return (strn[0] == strn[strn.length()-1]);
      }
      else
          return false;
  }
  </code></pre>