When you get to the end of the stream, pause for a second or two, then clear the stream and try again. Here is code that reads words from cin and prints them out, one per line. It also says when it's sleeping. This uses the UNIX sleep() call, which might not be available on your system: