problem in file handling

in my program of file handling,i had stored different information of a student like name,marks,enrollment number,address etc in a text document...now if i want to read any one of it, that is, suppose if i want to read only the address of that particular student,how do i do it??i mean,how do i retrieve a particular information from a text document??
Just read it all. There is no other way unless you know exactly where in the file the thing you want to read is.
so what's the use of this file handling..i thought i would help me to retrieve data after running my program again..is there any other concept which can help me out with this
I'm not sure what you are talking about. If you run a program, enter some information, close the program and want to access that information again, file does help you to do that. If you just use a file as an alternative to array, don't. If you have a ludicrous amount of data to actually need this, you should probably use a database, I guess.. Though I'm sure you don't have that much.
Topic archived. No new replies allowed.