<tt>void perror(char *s)</tt>




Document: The C Standard Library

next Diagnostics: assert.h
up Input and Output: stdio.h
gif int fclose(FILE *stream)

void perror(char *s)

perror(s) outputs the string s on stderr, followed by an error message which describes or elaborates the error code currently stored in errno. It is equivalent to:

fprintf(stderr, "message")
where error message is a string describing whatever error condition is represented by the current value of errno.

perror() might usefully be called on any occasion when your program detects that a standard library function has failed to operate as expected.



McMullin@eeng.dcu.ie
Fri Mar 29 14:35:38 GMT 1996