Hi,

Both Java and C++ have iterators, but usually in C++ books the iterators
are accompanied by examples on how to write them in C, and therefore it is
crystal clear there the issues that may surface.

Regards,

Bill
=======================================================================
Bulat Ziganshin <bulatz / integ.ru> wrote:
> MG> Well, that's simple enough. I was expecting something more esoteric. So
> MG> does this mean that at the implementation level there's really no
> MG> difference between

> MG>     stuff.each

> MG> and

> MG>     for (int i = 0; i < stuff.length(); i++) {

> definitely yes! iterator is a method of ABSTRACTING this cycle, hiding
> implementation details from class user. but internally it runs the
> same cycle