This what i have so far i have hard time understanding extract and even less luck with understanding how to turn the extract info into an array to be searched
In your case, you need to have the information seperated by spaces. In your studentidarray.txt file, you either must have:
001 Johnson Samantha 3.22
Or you could have
001
Johnson
Samantha
3.22
Or you could have a mixture of both
001
Johnson Samantha
3.22
The point is that you separate data either by endlines (I.E. "\n") or spaces.
Edit: Note that this is currently only exacting one student from the file. Trying to extract multiple students may be a bit trickier. Something like this would work.
1 2 3 4 5 6 7 8 9 10
int studentid;
char lastname[256];
char firstname[256];
double gpa;
while (fin >> studentid) {
fin >> lastname >> firstname >> gpa;
// Insert this data into a vector, array, or display it.
}