getting the iterator to a vector of iterators
I get a compiler error at this line, any ideas?
|
vector<set<SomeClass>::iterator>::iterator iter = <Obj>.begin();
|
<Obj> is of type vector<set<SomeClass>::iterator>
although when i use the index to iterate through the vector I encounter no problems
the error is <Obj>.begin();
you need to use a object or a pointer.
No angled brackets:
|
vector<set<SomeClass>::iterator>::iterator iter = Obj.begin();
|
You must be careful to read all the side-notes about iterators when storing them for later use.
Many functions invalidate them making them useless for later use.
Topic archived. No new replies allowed.