posted 13 years ago
I have to write and read from a 'database-like text file.
I'm simply trying to search through the text file for a certain value, the student ID.
Each line represents one student. The format looks like:
etc
I'm basically trying to find a student by their student ID.
My current attempt doesn't seem to work so well:
This current method is a result of me messing around with it and changing things at random.
My main problem is: it always returns the last student in the file, and I can't seem to figure it out.
I'm sure it has something to do with my logic. I'm pretty tired at the moment, so this is getting harder and harder by the hour, haha.
Anyone see the problem?