C
Christian Christmann
Hi,
my program contains a class with a STL vector std::vector<int> data and an
integer variable "currentbit" which indicates the current position while
traversing the vector.
In my function first() I'm searching for a particular value and save the
position in "currentbit". Within another function next() I'd like to
continue searching beginning in the vector at position "currentbit". My
idea was to create an iterator:
vector<int>::const_iterator iter = *data[currentbit+1]
but the compiler complains:
invalid type argument of `unary *'
What's wrong? How can I assing an iterator to a particular position in the
vector?
Thanks
Chris
my program contains a class with a STL vector std::vector<int> data and an
integer variable "currentbit" which indicates the current position while
traversing the vector.
In my function first() I'm searching for a particular value and save the
position in "currentbit". Within another function next() I'd like to
continue searching beginning in the vector at position "currentbit". My
idea was to create an iterator:
vector<int>::const_iterator iter = *data[currentbit+1]
but the compiler complains:
invalid type argument of `unary *'
What's wrong? How can I assing an iterator to a particular position in the
vector?
Thanks
Chris