Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

copy c++ stl

#include <bits/stdc++.h>
using namespace std;
int main()
{
    vector<int> v1 ={1,2,3,4,7,6,6,8,9};
    vector<int> v2 ={10,11,12,13,14,15};
    copy(v1.begin(),v1.begin()+3,v2.begin()+2);
    for(auto i:v2)
    {
        cout<<i<<" ";
    }
    return 0;
}
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #copy #stl
ADD COMMENT
Topic
Name
3+9 =