Is this proper use of perror.
FILE *fp;
if ((fp=fopen("file","w"))==NULL) {
perror(fp);
clearerr(fp);
exit(EXIT_FAILURE);
}I am passing the pointer to perror so if fopen fails perror should print a system message. And of course clearerr() needs to be used. Bill
