Just for the sake of keeping a flamewar going, it can be a good habit to use ++n within loops, not for performance reasons, but because of iterators. Although all of the standard iterators will be fine with n++, some custom written iterators do not implement the copy constructor, and thus ++n will work, while n++ will not compile. Thus, ++n everywhere enforces consistency.