I've read a couple of articles (example) that consider the classicfor (int ...... size() .... i++) loop bad practice when iterating through for example vectors in stl.  Instead the recommended why is to use vector iterators, i.e. begin, end, etc.Why is that?
Why is using classic for loops as iterators in stl considered bad?
stl
If you know you're operating on a std::vector, and that's never going to change, there's nothing fundamentally wrong with that form of for loop - it's well understood, easy to read, and the compiler will usually do a good job of eliminating the potential cost of calling size() on every loop.But using a for loop with iterators is more generic. It doesn't require that your container have a size() operator at all, and doesn't require that the container have index-based accessors at all (let alone efficient ones). So your code will be more generic if you go that route.Other things to consider these days:The range-base for loop: compact syntax, very few requirements on the container type.Algorithms like for_each/find/fill/... combined with lambdas if the body of the loop lends itself to it for more functional-style C++. 