Please help before I go bald ripping my hair out! Here's my function.
bool isPalin(char* str)
{
int len = strlen(str);
char str4[86] = {0};//initialize string
int j, k;
if (str[0] != str[len-1]) //If statement to test first and last character of string
{
return 0;
}
if (str[len] == 1) //If statement to allow for odd number of characters when it reaches the middle.
{
return 1;
}
for(j = 0; str[j]; j++)
{
if(j >= 1)
{
if(j == len)
{
break;
}
str4[j] = str[j];
}
}
return isPalin(str4);
}

New Topic/Question
Reply




MultiQuote







|