Well, when you type characters, they don't just vanish magically when your code is done reading. They stay in the stream waiting for the next input call. This loop will clear out the input stream for you, try to find a suitable place in your code to put it:
while ( cin.get() != '\n' )
;
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004