/Program/cpp/matrix_vector.cpp
#include<vector> #include<iostream> using namespace std; int main() { vector<int> vec[2]; for(int z = 0; z < 2; z++){ for(int i = 1; i < 10; i++){ vec[z].push_back(i); } // cout << z << endl; } for(int z = 0; z < 2; z++){ vector<int>::iterator pv = vec[z].begin(); while(pv != vec[z].end()){ cout << *pv++ << ' '; } cout << endl; } // cout << endl; return 0; }