| Type: |
|
| Level: |
Expert
|
| Date: |
2006-Dec-12
|
| Visited: |
2535 times
|
| Rating: |

|
| Author: |
Alex Plumpton |
|
|
File stream inherits a stream state member from the class ios. The stream state member records information on the status of a file that is currently being used. Stream state member uses bitfields to store the status ofthe error conditions that can appear in a file. The table shows various error handling function.
| Function |
Description |
| eof() |
Returns true if end-of-life is encountered while reading otherwise returns false.
|
| fail() |
Returns true when an input or output Operation has failed. |
| bad() |
Returns true if invalid operation is attempted or any unrecoverable error has occurred. |
| good() |
Returns true if no error has occurred. This means all the above functions are false. |