anancds / document

MIT License
1 stars 0 forks source link

Best way to extract a subvector from a vector? #149

Open anancds opened 3 years ago

anancds commented 3 years ago

vector::const_iterator first = myVec.begin() + 100000; vector::const_iterator last = myVec.begin() + 101000; vector newVec(first, last);

anancds commented 3 years ago

vector newVec(myVec.begin() + 100000, myVec.begin() + 101000);