read from file

Jun 17, 2009 at 5:22am
I have a problem while reading from a .txt file, I have a class named student and it has variables like name, age etc.
and there are several lines in the text file, each reprsent the whole information of a student, now the question arises, how to read them into name and age and others respectively.
Because one's name may have 2, 3 or 4 words, I dont know where to stop, especially when class student has, for example , address which is also consisted with lots of words.
Jun 17, 2009 at 8:12am
Can you post a line from the file?
Jun 17, 2009 at 1:17pm
Ok
Tracy McGrady Bartow,Florida
Artest Ron Queensbridge, New York
William (Bill) H. Gates Seattle
...
Jun 17, 2009 at 2:27pm
Not possible. Can you change the file format?
Jun 18, 2009 at 12:48am
like this?
Tracy McGrady /Bartow,Florida
Artest Ron /Queensbridge, New York
William (Bill) H. Gates /Seattle
...

Jun 18, 2009 at 8:32am
closed account (z05DSL3A)
http://en.wikipedia.org/wiki/Comma-separated_values
Jun 18, 2009 at 2:41pm
I got it! thank you , Grey Wolf and all.
Topic archived. No new replies allowed.