title: myProgrammingLab "palindrome" challenge and recursion
body: <p>I'm taking an Intro to Programming class and a good chunk of the material is drilled into our heads through myProgrammingLab. I'm having a little trouble with the concept of Recursion... It's sort of been hit or miss for me. This particular problem has me stumped. When I submit my code, it offers me </p>
  
  <pre><code>CTest1.cpp: In function 'bool isPalindrome(int*, int)':
  CTest1.cpp:9: error: invalid conversion from 'int' to 'int*'
  CTest1.cpp:9: error:   initializing argument 1 of 'bool isPalindrome(int*, int)'"
  </code></pre>
  
  <p>as advice, which I can assure you is not very helpful. Lol</p>
  
  <p>I think my main problem is when I get to the actual recursion. I'm aware that something's off, but.. If you could just point me in the right direction, I would very much appreciate it. </p>
  
  <p>A 'array  palindrome' is an array  which, when its elements  are reversed, remains the same (i.e., the elements  of the array  are same when scanned forward or backward) </p>
  
  <p>Write a recursive, bool-valued  function, isPalindrome, that accepts an integer -valued  array , and the number of elements  and returns whether  the array  is a palindrome. </p>
  
  <p>An array  is a palindrome if:
  the array  is empty (0 elements ) or contains only one element  (which therefore is the same when reversed), or
  the first and last elements  of the array  are the same, and the rest of the array  (i.e., the second through next-to-last elements ) form a palindrome.</p>
  
  <p>My code so far: </p>
  
  <pre><code>bool isPalindrome(int arr[], int n){
      if (n == 0 || n == 1)
      {
          return true;
      }
      else if (arr[n-1] == isPalindrome(arr[((n-1) - n) +1 ], n))
      {
          return true;
      } 
      else {
          return false;
      }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I have now changed my problem line to</p>
  
  <p><code>else if (arr[n-1] == isPalindrome(arr[], n-1))</code></p>
  
  <p>Now I get the hint "We think you might want to consider using +." I can't see where adding would apply here. I don't think it's talking about incrementing because it references incrementing as "++" like in code. </p>
  
  <p>I am also given the error message:</p>
  
  <p>CTest1.cpp: In function 'bool isPalindrome(int*, int)':
  CTest1.cpp:9: error: expected primary-expression before ']' token</p>
  
  <p>Is the second line giving an error because the brackets are empty in my first argument?</p>