----- Original Message ----- From: "Brett McCoy" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, August 04, 2008 9:18 PM Subject: Re: [c-prog] error checking
> What happens if you chance
>
> if(fp == NULL)
>
> to
>
> if(!fp)
>
> Or try it this way
>
> if((fp = fopen("file", "a")) == NULL) {
> ...
> } else {
> ...
> }
It makes no difference I've tried both those. If I try it the third way
it doesn't seem to want to compile.
Bill
