S
steve
Is there a way to catch file errors while writing
to a file using ofstream?
For ex., if the file is deleted or permissions changed
by another process after it is opened,
or when the disk is full.
I couldn't figure out which members could be used
to check for these types of errors.
I tried the good(), bad(), fail() etc.,
after writing to a full disk, deleted file etc.
They all returned success always.
Regarding the usage, I'm opening the file using
ofstream(....) and then using "<<" to do the writes.
Thanks for any help.
to a file using ofstream?
For ex., if the file is deleted or permissions changed
by another process after it is opened,
or when the disk is full.
I couldn't figure out which members could be used
to check for these types of errors.
I tried the good(), bad(), fail() etc.,
after writing to a full disk, deleted file etc.
They all returned success always.
Regarding the usage, I'm opening the file using
ofstream(....) and then using "<<" to do the writes.
Thanks for any help.