Vector in Vector in C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drkplaya
    New Member
    • Nov 2006
    • 1

    #1

    Vector in Vector in C++

    How do you push_back a vector in a vector? I have the following:
    vector<string> &names, vector<vector<i nt> > &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(temp 2)

    I must read in some names and scores which every person has a different amount of scores. Is this how you do it?
Working...