How to append vector matrix in C++? -


i have struct vector "array" that's looks like

struct competitor {     vector<string> name;     vector<int> points; }; 

and have file contains names , 10 pieces of result point read in, can't append vector. can't read it

int = 0; string tmp;  while(!x.eof()) {    getline(x, tmp, '\t');    t[i].name.push_back(tmp);    // tmp >> t[i].name;    cout << tmp << endl;     for(int = 0; < 11; i++)    {        x >> tmp;        t[i].pontok.push_back(tmp);    }    i++; } 


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -