I've got a problem with setting the state of various istreams in my programming. I'm supposed to input a value into a stream and then set the stream state to bad if the value is incorrect. Then I have to clear out the stream and reset it to the good state. Can anybody tell me what functions in the istream class do this? Any help would be appreciated.