Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool is_divisible(int m, int n)
- {
- return m % n == 0;
- }
- int main()
- {
- vector<int> v = { 3, 6, 9, 11, 15 };
- int n = 3;
- auto it = find_if(v.cbegin(), v.cend(), bind(is_divisible, _1, n));
- return 0;
- }
- auto it = find_if(v.cbegin(), v.cend(), not1(bind(is_divisible, _1, n)));
Add Comment
Please, Sign In to add comment