[Cs3] Remove_copy_if / erase idiom
Mikhail Nesterenko
mikhail at cs.kent.edu
Thu Oct 5 14:53:51 EDT 2023
>
> I had a question regarding lab 6(peaches). I was wondering if you
> wanted us to use the remove_copy_if with the erase algorithm, or
> just use remove_copy_if. The instructions for the lab seemed a bit
> opaque and unclear.
>
back_inserter()/front_inserter() make it unnecessary to use
remove-erase idiom as they expand the container on every element
insertion. We have not studied it in lectures, it is not on the exam,
but it is on the lab.
thanks,
--
Mikhail
More information about the cs3
mailing list