You can use range for statement to iterate all the elements in a two-dimensional vector.
vector< vector > vec;
And let's presume you have already push_back a lot of elements into vec;
for(auto& row:vec){
for(auto& col:row){
//do something using the element col
}
}