Reading specific lines
I am working on my project and i got one problem which i cant solve :mad
I have a file called files and inside the <files> file there are multiple lines of specific names of different files.
I am trying to figure out how do i access that file by a specifc line lets say access line 3 <file3.dat> and put it in a variable so i can do something with it.
Thanks in advance, :)
1) Open the file for reading.
2) Read a line into a buffer.
3) Increment the line count counter.
4) Stop readin when your counter is at whatever number you want.
5) Do something with what's in the buffer at that time.
Consider using fgets.
consider thinking up cleverer names for your files :)))