I have a problem where in my program, there is a place that calls the sleep function, and then afterwards it handles user input with _getch(). The problem I have is users pressing a key during Sleep() and it being processed by _getch() promptly after it is done with Sleep(). How can I clear the istream after Sleep()?