Haven't really gotten a proper answer for this question.
So I have a binary file which consists of data arranged by line, It looks like:
25
40
60
340
20
I want to read in only the third line of this binary file, so I want to read in 60 and I have to use seekg.
Previously, I just did a for loop which goes from 0-3 and reads it in a single variable, so basically it overwrites the variable until it goes to the third line.
How do I use seekg for this?
I know I can't do seekg(3).. do I have to do 3*sizeof(obj)? how do I manipulate the byte offset so I can read in the third line?