When I right std::cin.get(); it's not working

why???
Maybe the failbit is set? This happens when a read operation fails and leads to failure of all future read operations. In order to clear the failbit so that you can read from std::cin again you need to use std::cin.clear().
http://www.cplusplus.com/reference/ios/ios/clear/
Last edited on
I suppose you meant "write" instead of "right" - anyway, you are giving us way too little information.

What do you mean by "it's not working" - does it not compile? Or does it compile but fails on every input? Or does it work for some inputs and for some not?

What is the expected behavior, and what behaviour you got?
Hello ehsan687,

In addition to what bheadmaster says, what does your code look like. It is hard to guess at what might be happening unless it can be seen what you have done.

Andy
Topic archived. No new replies allowed.