Hello, I am trying to save my position in a file to resume after running some checks that will position the file pointer at EOF.
fpos_t *floc; /* location in file to where i want to return */
/* in between here i search for a string */
fgetpos(fp, floc); /* where fp is of type FILE* */
I am sure it is segfaulting when calling fgetpos... What am I doing wrong? If the string is not found the function exits, so I am sure fp is at a valid position after the search.
fpos_t *floc; /* location in file to where i want to return */
/* in between here i search for a string */
fgetpos(fp, floc); /* where fp is of type FILE* */
I am sure it is segfaulting when calling fgetpos... What am I doing wrong? If the string is not found the function exits, so I am sure fp is at a valid position after the search.
Comment