(ANSI Standard)
#include <stdio.h> perror(s);
"perror" prints out an error message based on the current value of the external variable "errno". The value of "errno" is set by C library functions when error conditions are encountered. Thus the message printed by "perror" reflects the last error encountered during a call to a library function. The function "strerror" obtains the text of the appropriate error message.
Copyright © 1996, Thinkage Ltd.