On Mon, Aug 4, 2008 at 8:49 PM, Bill Cunningham <[EMAIL PROTECTED]> wrote:
>> Can you show a full example (including include statements, main(), etc
>> -- cut and paste from your code editor) and the actual error you are
>> getting from the compiler? Do you have #include <stdio.h> at the top
>> of your program?
>>
>> -- Brett
>
> Oh yes I have proper preprocessor directives
>
> #include
> int main() {
>
> Is above char a[]="hello\n";
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.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi