I have two vectors of object. Something like:
std::vector<thing> all_things;
std::vector<thing> bad_things;
I want to obtain a third vector that contains the good_things. In other words, every object in all_thing that is not belong to bad_things:
std::vector<thing> good_things=subtract(all_things,bad_things);
Any Ideas about how to implement subtract in most efficient and standard way.
P.S the vectors can NOT be ordered because the class thing does not have any thing to be ordered by. Thanks!
Aucun commentaire:
Enregistrer un commentaire