cin.clear(); cin.ignore(100, '\n'); //100 --> asks cin to discard 100 characters from the input stream.