I read something from "More Effective C ++", paragraph 18:
In short, an iterator is an object, not a pointer, so there is no guarantee that "->" can be applied to it. STL really requires that "." and "*" are true for iterators, therefore (* it). the second, albeit syntactically clumsy, is guaranteed to work.)
I usually use ->iterators and there are no problems. Can someone give an example or explain it?
source
share