From what I have read, cin.clear() resets the flags, but how does this clear the input buffer?
cin.clear()