so let say i have a struct and array i need use getline
for example
text file 1 student
0 bob F
1 mike B
2 sandy C
text file 2 gpa file
2 math 2
1 history 3
0 english 0
text file 3
2 pass 213 jog rd, 23478 ,new york
0 failed 745 starship rd,25698,new york
1 pass 112 nice rd,23958,earth
so i understand the first two files but how would get line fall into play on the last file
You'd have to give more information about the struct (for e.g. its declaration) corresponding to text file 3 to receive any meaningful suggestions about how to parse the file to 'fill-up' the matching data-members of this underlying struct from the lines of the file
PS: since you did not have any questions re file 1 and file 2 it was unnecessary to post them in the first place
2 pass 213 jog rd, 23478 ,new york
0 failed 745 starship rd,25698,new york
1 pass 112 nice rd,23958,earth
(formatted with the [output] [/output] tags).
The first two fields presumably could be interpreted as an id number followed by a fixed-length character string. The next field, a 3-digit integer could be some sort of score, or maybe it is part of what looks like an address?