01-10-2012 03:24 PM
Does anyone know why txt file is empty without any content??
FILE* f= fopen("/shared/documents/save.dat", "w");
if(f==NULL){
fprintf(stderr,"Cannot create output.txt\n");
_exit(1);
}
fprintf(f,"Hello World");
File is created, but the txt file is empt without "Hello World".
Solved! Go to Solution.
01-10-2012 03:35 PM
Ha ha solved.
fclose(f);
01-10-2012 03:47 PM