Palindrome Checker in C++