I want to iterate over a vector of an custom structure "Edge". I have sorted the vector beforehand for the attribute weight. Sometimes I want to stop iterating over the vector, calculate other stuff. When I iterate over the vector again, I want to start at the last visited element.
Example with Integers: Edge : [0,1,2,3,4,5,6] Iterate: 0,1,2 Break out of function and calculate other stuff Iterate: [3,4,5,6]
I thought about saving a vector::iterator. It would be easier to change the pointer to the first element to the wanted element instead but I didn't found anything for this
Thanks.