M
mike3
Hi.
I was wondering if this was a good or bad idea. I was trying to
program a "container" object which has iterators, and was thinking of
having member functions that take as parameters iterators into that
container. Is that a good or bad idea? Because it is possible to pass
an iterator to the wrong container. But I noticed that in standard
containers there is this kind of thing (like vector::erase).
I was wondering if this was a good or bad idea. I was trying to
program a "container" object which has iterators, and was thinking of
having member functions that take as parameters iterators into that
container. Is that a good or bad idea? Because it is possible to pass
an iterator to the wrong container. But I noticed that in standard
containers there is this kind of thing (like vector::erase).