A question about STL C++?
C++ Gurus
4
Posts
2
Posters
1.9k
Views
1
Watching
-
wrote on 8 Jun 2013, 11:36 last edited by
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 -
wrote on 8 Jun 2013, 12:02 last edited by JohanSolo
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.
-
wrote on 8 Jun 2013, 13:21 last edited by
yes thanks i think i missed that
-
wrote on 4 Aug 2013, 15:19 last edited by