Originally Posted by
Elysia
OK, listen to warnings. This will definitely warn.
To be able to call a function without a prototype is just pure idiocy IMO. It should not be allowed.
it wasn't giving me any warnings. I thought of adding a prototype but didn't think it would cause the problem. now I have a better understanding of it all. I'm learning as fast as I can.
now, I'm trying to add a log file to my program. this is giving me some trouble now too. again, probably something simple. it creates the new file, but it's always empty.
Code:
FILE *f1=NULL;
int main(int argc, char* argv[]){
f1=fopen("temp.log","w");
if(f1==NULL){printf("Error opening temp.log for writing");}
fputs("test",f1);
fclose(f1);
}