Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

combine two vectors c++

vector<int> v1 = {1, 2, 3}; 
vector<int> v2 = {4, 5, 6};
copy(v1.begin(), v1.end(),back_inserter(v2)); 
// v2 now contains 4 5 6 1 2 3
 
PREVIOUS NEXT
Tagged: #combine #vectors
ADD COMMENT
Topic
Name
4+6 =