is there any difference between running over a vector using [], like this:
vector<ClassName*> my_vec(10);
int N = 10;
for (int i =0; i<N; i++){
cout<<my_vec[i];
}
or, using iterators, like this:
for(std::vector<ClassName*>::iterator it = my_vec.begin(); it != my_vec.end(); it++) {
cout<< (*it);
}
except the fact that we neet to keep an updated variable to hold vector size?