----- Original Message ----- From: "Brett McCoy" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, August 04, 2008 8:58 PM Subject: Re: [c-prog] error checking > What compiler are you using? Because this code: > > #include <stdio.h> > > int main() { > > char a[]="hello\n"; > FILE *fp; > fp = fopen("file","a"); > if (fp == NULL) { > puts("fopen error"); > exit(1); > } > > return 0; > } > > compiles and runs cleanly with gcc under CygWin.
gcc-3.4.6 with linux.
Bill
