Why do we use getline to in any palindrome program?
getline reads the whole line. operator>> only reads one word.
Getline reads all the way until a new line is formed. >> only reads until a space.
It's also far less error prone and can be manipulated far easier. Although with the advent of C++11 that's less of a problem.
But the primary reason is to deal with phrases.