Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ vector extend vector

std::vector<int> a = {1, 2};
std::vector<int> b = {3, 4, 5};
a.insert(a.end(), b.begin(), b.end()); // a = {1, 2, 3, 4, 5}
Comment

PREVIOUS NEXT
Code Example
Cpp :: count bits c++ 
Cpp :: vector size for loop 
Cpp :: get value of enum cpp 
Cpp :: coordinate in 1d array c++ 
Cpp :: how to send email in c++ program 
Cpp :: binary representation c++ 
Cpp :: c++ vector size 
Cpp :: how to get the type of a variable in c++ 
Cpp :: what is c++ used for 
Cpp :: how to make an overloaded constructor in c++ 
Cpp :: clear qlayout 
Cpp :: C++ Structures (struct) 
Cpp :: insert only unique values into vector 
Cpp :: initialize vector of vector c++ 
Cpp :: c++ encapsulation 
Cpp :: 58. Length of Last Word leetcode solution in c++ 
Cpp :: Reverse Level Order Traversal cpp 
Cpp :: remove space in string c++ 
Cpp :: currency converter c++ 
Cpp :: c++ get the line which call a function 
Cpp :: convert 2d array to 1d c++ 
Cpp :: if statement c++ 
Cpp :: how to change colour image to grey in opencv c++ 
Cpp :: c++ in cmd 
Cpp :: c++ saying hello world 
Cpp :: SUMOFPROD2 codechef solution 
Cpp :: how to use command line arguments with integers in c++ 
Cpp :: C++ Nested if...else 
Cpp :: string comparison c++ 
Cpp :: how to input in cpp 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =