C++ – Concatenating two std::vectors

c++concatenationstdvectorstlvector

How do I concatenate two std::vectors?

Best Solution

vector1.insert( vector1.end(), vector2.begin(), vector2.end() );