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
Post a Comment