Filling a Vector with Structs

gamer541 (3)
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.
Ogoyant (153)
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
gamer541 (3)
Yes. I'm trying to figure out if I was headed in the right direction or if I needed to start over completely?
Registered users can post here. Sign in or register to post.