B
barcaroller
I've noticed that neither container.begin() nor container.end() return
an error when the container is empty, so I get a nasty segfault when I
dereference the iterator. Do I have to check if the container is
empty every time I use an iterator, or am I missing something?
Speaking of iterators: if I initialize 'iter = container.end()', can I
count on iter to stay equal to container.end() even if elements are
deleted and added to the container?
an error when the container is empty, so I get a nasty segfault when I
dereference the iterator. Do I have to check if the container is
empty every time I use an iterator, or am I missing something?
Speaking of iterators: if I initialize 'iter = container.end()', can I
count on iter to stay equal to container.end() even if elements are
deleted and added to the container?