In C++, can you manually set the failbit of a stream? How?

Viewed 14716

I am overloading the input stream operator for use with a Time class and would like to manually set the failbit of the input stream if the input doesn't match my expected time format (hh:mm). Can this be done? How?

Thanks!

1 Answers
Related