|
|
Le 28/02/2014 20:16, Orchid Win7 v1 nous fit lire :
>
> What I would *actually* like to do is just throw iterators around.
> However, for reasons beyond my comprehension, nobody thought to include
> an "is_at_end()" method in the standard iterators.
For a container foo (of class Foo), the iterator (forward) is at end
when == foo.end() .
If you like for(auto k: foo), you would be better inspired with for(auto
& k: foo) (otherwise k is a copy of each element of foo.
The classical for() is : for( k = foo.begin(); k!= foo.end(); ++k)
Post a reply to this message
|
|