I want to have my program read through the cin buffer until there's nothing left in it to read.

What a lot of places seemed to suggest for this was:

```
while (cin)
{
    cin >> s;       
    //do stuff with s
}

```

However, when I try this, even while the cin buffer is empty, the program just infinitely waits for input and executing the loop.

Doing while(cin >> s) does the exact same thing.