[Cs3] CS3: Pretty good explanation for remove_copy_if()

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Oct 4 10:53:04 EDT 2023


> 
> I was trying to wrap my head around remove_copy_if(). I kind of get it from using it in the lab (shout out to Noah from tutoring), but the name made no sense for what it seems to do. I found this post that kind of clarifies it, could be helpful: https://www.educative.io/answers/how-to-use-the-removecopyif-function-in-cpp
> 
> It should've been called copy_if_not() instead.
> 

Well, the algorithm name may not be the best. The slides (slide 22)
may help a bit. We also have th algorihtm example usage here:

 http://antares.cs.kent.edu/~mikhail/classes/cs3/Examples/STLAlgorithms/Modifying/removeCopyIf.cpp

Thanks,
--
Mikhail


More information about the cs3 mailing list