A question about STL C++?
-
we need to use backin_serter and front_inserter with the algorithms
that removes or copy elements like copy,remove_copy because they can't change the size of containers only elements
but why we don't use it with transform? even though it changes the size of the reciever container -
AFAIK std::transform cannot change the size of the output container, have a look at"the doc: the output container must have the same size as the input one. To be more specific, the output container must have the same size as the processed input range, which can be different from the size of the input container.
-
yes thanks i think i missed that
-