Seems like this should be simple, but I don't find it in a net search.
I have an ofstream which is open()
, and fail()
is now true. I'd like to know the reason for the failure to open, like with errno
I would do sys_errlist[errno]
.
Unfortunately, there is no standard way of finding out exactly why open() failed. Note that sys_errlist is not standard C++ (or Standard C, I believe).