I need to move the pointer many lines within a text file.
Example:
test.txt
-------------------
Bob
26
Programer
John
30
User
Kelly
44
Boss
-------------------
Say I want to replace entry two's info. There will always be 3 lines for each entry but the names/ages/job titles will never be the same. fseek only moves me one character at a time and i don't know the length of each line. I know how to use the fput command I just don't know how to move the pointer "x" number lines.
Example:
test.txt
-------------------
Bob
26
Programer
John
30
User
Kelly
44
Boss
-------------------
Say I want to replace entry two's info. There will always be 3 lines for each entry but the names/ages/job titles will never be the same. fseek only moves me one character at a time and i don't know the length of each line. I know how to use the fput command I just don't know how to move the pointer "x" number lines.