#include <stdlib.h>
#include <stdio.h>
#include <share.h>
#include <stdlib.h>
FILE *FPlogHigh;
int main(int argc, char **argv)
{
FPlogHigh = _fsopen("filename".txt", "a+",_SH_DENYWR);
fprintf(FPlogHigh,"\nHello log started\n");
fclose(FPlogHigh);
...
}