Re: [gtk-list] Re: Gtk--: G_List quirks

Some Guy <> writes:

> Ewwww no, I hate iterators :). I don't really understand the point of
> them; they just use fancy operators to traverse through lists.

They are fancy operators to traverse any data containing
structure. Linked lists are just one of them.

> What's the difference between doing
>     lptr = lptr->next;
> and
>     ++liter;

That ++iter may also mean 'array[++i]'.

> ? Of course I'm probably missing some advantage to them, but even so, they
> are just a fancy way of saying 'I spent a lot of time coding my linked
> list', when the same thing could be accomplished without them.

All I can add to the two previous replies is that I very strongly
suggest you learn about the STL (I have a few pointers among my
bookmarks on my homepage). You are missing something indeed. The only
valid reason for not using the STL when writing C++ today would be
being forced to use an obsolete compiler.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]