For my class I need to make my function able to read palindrome strings (Words that are spelled the same backwards ex: racecar) while ignoring punctuation and spaces Ive made a function that can read and print basic palindromes like racecar, but I don't know how to make it read a palindrome like ex: Was it a cat I saw?
1 2 3 4 5 6 7 8 9
bool is_palindrome( string s )
string rev = s;
reverse(rev);//now string rev is reversed of s
if(rev == s)