By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,599 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,599 IT Pros & Developers. It's quick & easy.

Vector in Vector in C++

P: 1
How do you push_back a vector in a vector? I have the following:
vector<string> &names, vector<vector<int> > &scores

while(fin.eof)
{
fin >> temp
names.push_back(temp)
while(fin.eof)
for(int i=0; i<scores.size(); i++)
scores[i].push_back(temp2)

I must read in some names and scores which every person has a different amount of scores. Is this how you do it?
Nov 9 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.