Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<int> foo = {...whatever...};
- std::vector<int> bar;
- std::back_insert_iterator< std::vector<int> > back_it (foo);
- std::copy_if (foo.begin(), foo.end(), back_it, MyPredicate);
- std::vector<int> foo = {...whatever...};
- int mycount = count_if (foo.begin(), foo.end(), MyPredicate);
- std::vector<int> bar (mycount);
- std::copy_if (foo.begin(), foo.end(), bar.begin(), MyPredicate );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement