Hello, I was helped earlier, and I was hoping I could be helped again.
I have a vector of sets, which I am removing any element which contains a certain value. For example, if I was looking for 2:
[0] 1 2 3
[1] 4 5 6
After the program was run, I would be left with just [0]4 5 6.
This is the code I have been using
1 2 3
auto iter = std::remove_if( clauseVector.begin(), clauseVector.end(),[propagator] ( const std::set<int>& i ){
return i.find(propagator) != i.end() ; } ) ;
clauseVector.erase( iter, clauseVector.end() ) ;
I want to know, is there any way I can tweak this code so that it only removes one part of the set rather than the whole thing. For example with above example, I would be left with