an array of structs

Joined
May 21, 2009
Messages
1
Reaction score
0
I am trying to create an array of structs. I am extracting the info from a file and putting them into the struct using the getline function. But I don't know how to put the structs into the arrays. I need to make a loop to put the info in the structs. The struct looks like this:

struct students
{
string id;
string fname;
string lname;
};

Is there something easy that I'm missing that does this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top