for(auto it:vector) VS for(auto& it:vector)
vector<vector<int> ivec> ovec;
for(auto it:ovec)
{
it.push_back(...)
}
here it is just a copy of it's iterator.
vector<vector<int> ivec> ovec;
for(auto& it:ovec)
{
it.push_back(...)
}
vector<vector<int> ivec> ovec;
for(auto it:ovec)
{
it.push_back(...)
}
here it is just a copy of it's iterator.
vector<vector<int> ivec> ovec;
for(auto& it:ovec)
{
it.push_back(...)
}