Thursday, May 1, 2008

Demonstrate strerror and perror

# include

# include “ourhdr.h”

int

main(int argc, char *argv[ ] )

{

fprintf(stderr, “EACCESS: %s\n”, strerror(EACCES) );

errno = ENOENT;

PERROR( argv [0] );

Exit (0);

}

No comments: