>> Since when are the actions of reading a string, constructing a stringstream that can read the
>> string, and extracting data from the stream classified as "advanced" operations?????

They're not advanced at all, but they are still more advanced than clear() and ignore(). If the OP has never used or learned stringstream, then adding that class to his or her repertoire is a little bit more work than just clearing the stream and ignoring the bad characters.

As to whether my suggestion is the best solution or not, I won't argue that it is in all cases. I do think it is the simplest solution that is effective enough for what the OP is doing right now.

Aisthesis, using grumpy's method isn't that much more advanced, you just need to be familiar with stringstreams in addition to how input streams work in general. It is worth learning if you have some time, it shouldn't take you that long to be proficient enough in C++ to understand it.