Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

assign one vector to another c++


   // Initializing vector with values 
    vector<int> vect1{1, 2, 3, 4}; 
  
    // Declaring new vector 
    vector<int> vect2; 
  
    // Using assignment operator to copy one 
    // vector to other 
    vect2 = vect1; 
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #assign #vector
ADD COMMENT
Topic
Name
2+8 =