[[Programming]]
/Program/cpp/matrix_vector.cpp
他に/statistics/myR/RMatrix.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;
}