How to get "std:cin" to block

Hello,

I just wrote a small test program to prompt user to enter a number (int) with "std::cin", but it did not block when I run the program, it seemed like it read input from somewhere other than the keyboard(same behavior with scanf())".

My questions are:

1) How can I verify this is the case (read input from somewhere other than the keyboard)?
2) How can I get it to block so I can enter something from the keyboard?

Thanks.
std::cin and scanf() do block. Something else is at work here; possibly other input left in the buffer from something else.
You need to post the test program.

please use [code] tags:
http://www.cplusplus.com/forum/articles/16853/
Topic archived. No new replies allowed.