A palindrome is a string that is equal to its reverse - "mom", "I", "radar", and "able was I ere I saw elba". Write a recursive Boolean function that determines whether its parameter is a palindrome. You should ignore whitespace and punctuation in the parameter. You may simply hard code the text that is then initially passed to the function.
So here's what i wrote
// string::length
#include <iostream>
#include <string>
using namespace std;
int main ()
{
function bool isPalindrome(String input)
{
int len = input.length();
bool isPalindrome = true;
// only have to iterate through half the length of the string
for(j = 0; j<len/2; j++)
{
if(input[j] != input[len - 1 -i])
{
isPalindrome = false;
break;
[code] Your code goes here [/code]
That is not recursive.
You can't define a function inside another function.
The language(?) is case sensitive String string