Quote Originally Posted by leourb View Post
I have solved changing my bool function in something more verbose but more specific:

Code:
bool is_palindrome(const char* c, const char* p)
{
    int n = len(c);
    for (int i = 0; i < n; ++i)
    {
        if (c[i] != p[i]) return false;
    }
    
    return true;
}
Now it seems to work!
This assumes that the length of the strings pointed to by c and p are the same (or at least string length p is not less than string length c).