Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
how to find the first iterator that not equals to some specifiedvalue?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Barry, post: 3407210"] find_if: the predicate version of find bool not_equal_to_1(int i) { return i != 1; } void foo(std::vector<int> const& V) { std::vector<int>::const_iterator pos = std::find_if(V.begin(), V.end(), not_equal_to_1); } if you borrowing Boost.Lambda, it could be much simpler. std::find_if(V.begin(), V.end(), _1 != 1); [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
how to find the first iterator that not equals to some specifiedvalue?
Top