S
Sachin
Hi,
I want to do a task of modifying the elements in a range, say 5th
element to 10th element.. I also know that there is a function
TRANSFORM which is used to transform the elements of any container,
say a vector, but in that function, the arguments are iterators, and
what I have is a range and not iterators to these elements.
Eg
vector<int> v;
v.transform(v.begin(),v.end(),v.begin(),modifying_func);
//this, I want to apply not from begin to end, but from say, element
at index i to index j;
//similarly, if I want to know the values in a range of vector or
list, not from begin to end, how can I //get to know that??
So is there any function or way in which I can do this operation??
I want to do a task of modifying the elements in a range, say 5th
element to 10th element.. I also know that there is a function
TRANSFORM which is used to transform the elements of any container,
say a vector, but in that function, the arguments are iterators, and
what I have is a range and not iterators to these elements.
Eg
vector<int> v;
v.transform(v.begin(),v.end(),v.begin(),modifying_func);
//this, I want to apply not from begin to end, but from say, element
at index i to index j;
//similarly, if I want to know the values in a range of vector or
list, not from begin to end, how can I //get to know that??
So is there any function or way in which I can do this operation??