we have to merge the two vector and i am do so but i do not get the output from the give code ...please help me to find out the problem..
#include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<int> v1={1,2,4,5};
vector<int> v2={10,9,6,3};
vector<int> v3;
int i=0;
for(int value1:v1)
{
v3[i]=value1;
i++;
}
for(int value2:v2)
{
v3[i]=value2;
i++;
}
for(int value3:v3)
{
cout<<value3<<" ";
}
}
a correct code for my question