C
Carol Pedder
Hello all, may I ask a question?
Having just started C++ (using microsoft visual studio), I am using cin/cout
for console applicarions (yes I know it doesn't happen in the real world!)
and I'm finding it difficult to track down a method of clearing the input
buffer after a cin (to get rid of potential rubbish).
cin.flush() has been mentioned, but isn't an option on visual studio and
cin.ignore() requires you to specify number of chars to ignore.
Any help much appreciated.
Regards
Carol
Having just started C++ (using microsoft visual studio), I am using cin/cout
for console applicarions (yes I know it doesn't happen in the real world!)
and I'm finding it difficult to track down a method of clearing the input
buffer after a cin (to get rid of potential rubbish).
cin.flush() has been mentioned, but isn't an option on visual studio and
cin.ignore() requires you to specify number of chars to ignore.
Any help much appreciated.
Regards
Carol