1 using namespace std;
2
3 vector<vector<string>>& vAllRow;
4 while(读取数据到r中)
5 {
6 vector<string> vRow;
7 vRow.clear();
8
9 vRow.push_back(r[0]);
10 vRow.push_back(r[1]);
11 vRow.push_back(r[2]);
12 vRow.push_back(r[3]);
13 vRow.push_back(r[4]);
14 vRow.push_back(r[5]);
15
16 vAllRow.push_back(vRow);
17 }
18 //数据存储到了vAllRow中,下面将数据显示出来
19 vector<vector<string>>::iterator item2v=vAllRow.begin();
20 while(item2v!=vAllRow.end())
21 {
22 vector<string>::iterator item=(*item2v).begin();
23 while(item!=(*item2v.end())
24 {
25 cout<<*item<<"\t";
26 item++;
27 }
28 cout<<endl;
29 item2v++;
30 }