Hi,
I am new to this forum and C++ programming. I wanted some help for coding a program so as to access some data from a file.
I want to write a function lets say fn1() which will scan a line everytime the function fn1() is called.
Code:
13233266 14 16 25.80 23.50 24.40 58.76
13233486 14 12 24.74 24.73 23.88 60.04
13233584 12 14 25.30 22.48 23.77 58.71
13233804 14 14 25.25 23.27 23.65 58.77
13233909 10 14 25.37 22.54 24.01 58.15
13234117 16 8 24.66 21.75 23.03 58.60
13234227 6 16 25.52 23.58 25.15 59.14
13234331 12 20 25.21 23.68 24.36 59.59
these are the data present in values.txt
I have to write fn1() such that for the
first time fn1() is called it should input first line,
second time its called it should input second line
can anyone help me... how should i use fseek to jump to the line i want...i can handle with fopen and fscanf..
But the major problem is Jumping to the required line