this is not a wrong statement but it behaves different to your intention. What this basically does is:

12

palindrome_check = true; //Assigns the value 'true' to the variable, overriding the previous valueif(palindrome_check) //Checks if palindrome_check is logically true, which it is because you assigned true it at the previous line

You are right. However, personally I like to implement checks like first != last before actually using the function instead of putting that inside the function. The reason is overhead: if I know the size of the container > 0, then I do not want to check anything.

it also thinks that "baaa aaa " is a palandrome, as you're saying that it's a match if either front or back point to a space.

You can handle the leading and trailing spaces by skipping over them before you begin the loop, along the lines of

1234567

while(' ' == *front) {
++front;
}
while(' ' == *rear) {
--rear;
}

The problem with the "rear" loop is that it cannot handle strings which just contain spaces. The "front" loop with stop at null terminator at end of string, but there's no "null start" to help in the "rear" case.

On top of that, you really want the function to return false for a blank string. If both front and rear move to the other end of a blank string, then the while loop will not run, and the function will return true.