I have an array something like this
int A[] = {1, 2, 3, 4, 5, 6, 7}
vector<int> vec;
int index = 0;
for(int i = 0; i < A.size(); i++) {
if(some condition) {
index = i;
}
**vec(A + index, i);**
}
how to convert an array to vector starting from particular index, like above ?
vec.push_back()and fill up vector that way? If you want to copy entire array int vector:for(int i = 0; i < 7; i++)vec.push_back(A[i]);