Enter a sentence: This is a sentence.
This
What was left in the buffer: is a sentence.

Another major difference between using cin >> foo and getline(cin,foo) is that the first will leave a newline in the buffer while the latter does not. Therefore, it is recommended to not have a mixture of these two calls in your code. Otherwise, getline(cin,foo) might read in a newline left by a cin >> foo call, and would end up looking as if it were "skipped over."

Additional info:
There is also another version of getline for character array parameters.