Is there a way to get a specific error condition when opening a C ++ stream? That is, whether it failed because the file did not exist, or the permissions were incorrect, etc. I am mainly looking for functionality equivalent to errno for fopen () in simple C.
GCC seems to set errno correctly, but it does not look like the C ++ standard, and I cannot determine if this is just an artifact of how they implemented the threads, or an intentional function (and therefore I don't know if it is saved in different versions).
Is there a way to get this information reliably, either in standard C ++, or not by accident in one or more main compilers?
c ++ stream
Joe Ganley Nov 20 '08 at 0:28 2008-11-20 00:28
source share