[Cs3] appending a vector

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Jul 1 09:32:42 EDT 2015


CS3 students,

Apparently, there is no specific way to append one vector to the
other. The straightforward way 

       v1.insert(v1.begin(), v2.begin(), v2.end());

Is the preferred way. For C++ strings, there is the operation append()
but it is not defined for vectors.

Thanks,
-- 
Mikhail

 PS: I am going through the backlog of questions, all this is not be
 on the midterm


More information about the cs3 mailing list