I know my file pointer is at end of the line after printing this string: “xyz”.
How can I get it to the start of the line? (pointing to x)
offset = ftell(fp);
fseek(fp, offset - sizeof("xyz") , SEEK_SET);
Above doesn’t seem to work.
How can I achieve that?
I would store the offset by issuing a
beginning = ftell(fp)before reading/writing you “xyz”.Then
fseek(fp, beginning, SEEK_SET);Would this be possible?