Napr. tym googlom najdes referenciu http://www.cplusplus.com/reference/istream/istream /operator%3E%3E/
a zistis ze
Errors are signaled by modifying the internal state flags:
eofbit The end of the source of characters is reached during its operations.
failbit The input obtained could not be interpreted as an element of the appropriate type.
Notice that some eofbit cases will also set failbit.
badbit An error other than the above happened.
(see ios_base::iostate for more info on these)