Message text for ferror() return value
c, c++, error-handling, io
Solution
From this reference page:
The ferror() function shall test the error indicator for the stream pointed to by stream.
This means that `ferror` returns a boolean that tells you if there is an error or not, nothing more. But according to the POSIX specification the value of `errno` will contain an error code in case of a failure.
Problem
How can I get the message for error codes returned by `int ferror(FILE*)`? For `errno` there is the `char * strerror(int)`. What is it for codes returned by ferror? If `char * strerror(int)` is good for that too, then I need a reference for it (I failed to find any indicator for this case).