Truncheon
Truncheon

Reputation: 976

How do I detect a fatal error when fstream data is being written to disk?

What's the right way to check that no fatal errors have occurred after flushing data from a C++ fstream object?

Upvotes: 2

Views: 98

Answers (1)

user124493
user124493

Reputation:

As a derivative of ios, fstream provides a means to check for errors on i/o operations. You can rdstate or you can check good on the stream to look for errors.

Upvotes: 1

Related Questions