This may seem like an odd question but I was talking to a friend today who was ranting about today's C++ programmers and how they just don't do things quite right. He said his main pet peeve was the abuse of iterating, in code like this:
for(int i = 0; i<((int) someVector.size()); ++i){
//Something here
}
instead of the more traditional
vector::iterator i;
for(i = someVector.begin(); i!=someVector.end(); ++i){
//Something here
}
While I understand both methods, is there any particular reason why the second is superior to the first? Is it performance? Or some other factor?
Thanks in advance.