Guest User

Untitled

a guest
Feb 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. bool is_divisible(int m, int n)
  2. {
  3. return m % n == 0;
  4. }
  5. int main()
  6. {
  7. vector<int> v = { 3, 6, 9, 11, 15 };
  8. int n = 3;
  9. auto it = find_if(v.cbegin(), v.cend(), bind(is_divisible, _1, n));
  10. return 0;
  11. }
  12.  
  13. auto it = find_if(v.cbegin(), v.cend(), not1(bind(is_divisible, _1, n)));
Add Comment
Please, Sign In to add comment