Should I need to call reset method or anything, when I try to use c++ stl set find method multiple times?
+7
A:
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.
Kirill V. Lyadvinsky
2010-07-29 21:24:30
Nope. The find, lower_bound, upper_bound and equal_range member functions each have two versions, one constand the other non-const. In each case the behavior of the two functions is identical except that the const versionreturns a const_iterator and the non-const version an iterator. 23.3.1.3
DumbCoder
2010-07-30 08:01:17