if(RS_ile==1)
{
if(RS_buf == 1) break;
if(RS_buf==49)
printf("1\n");
else
{
printf("%d\n", RS_buf);
fprintf (fp, "%d\n", RS_buf);
fclose (fp);
}
}
Everything work fine but all data was saved after I close my program. All I need is to put date to file while program is running not after closed.
Operating system Windows 8.1
Put a fflush(fp) ;
after your fprintf.