I am writing the log file in my c application, the method for writing the file is
fopen_s(&fMainFile, "c:\\LOG\\Filter.txt", "a");
fprintf(fMainFile, "SomeText");
fclose(fMainFile);
I open the handle, after writing I closed it, but this writing crash my application after a while, can any one sort out this problem, that how much dangerous to open and close the handle again and again, or proposed any other approach for writhing the file.