Filling a Vector with Structs

Feb 1, 2013 at 1:06am
I am doing a homework assignment and am totally lost right now on how to fill a vector with structs that are read in from a separate file. Each line in the file would read for example "Doe John M 26" for the name of the person, gender and age. I just need to get pointed in the right direction so I can get this started.
Feb 1, 2013 at 1:14am
Something like this:

http://www.cplusplus.com/forum/general/91253/#msg490558

EDIT: I see you already have written some code and gotten feedback in the duplicate thread in the Beginners section, so this won't be of much use.
Last edited on Feb 1, 2013 at 1:16am
Feb 1, 2013 at 1:19am
Yes. I'm trying to figure out if I was headed in the right direction or if I needed to start over completely?
Topic archived. No new replies allowed.