Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to copy vector to another vector in c++

// Using assignment operator to copy one
    // vector to other
    vect2 = vect1;
//another way:
// Copying vector by copy function
    copy(vect1.begin(), vect1.end(), back_inserter(vect2));
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #copy #vector #vector
ADD COMMENT
Topic
Name
7+3 =