how can I get a subvector from a vector?
Vector problem-
Hey Imran, suppose you want elements from a vector from range [l,r]. To get it do:
vector b(a.begin+l,a.begin+r+1);
this copies elements of a from index l to r in vector b.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.