Boolean
Boolean

Reputation: 14664

C++ iterator, do I need to reset after using set find method

Should I need to call reset method or anything, when I try to use c++ stl set find method multiple times?

Upvotes: 0

Views: 978

Answers (1)

Kirill V. Lyadvinsky
Kirill V. Lyadvinsky

Reputation: 99565

set::find is a const method, it doesn't change the container. It doesn't work in findfirst/findnext style. You can call it multiple times without any additional actions.

Upvotes: 7

Related Questions