J
JDT
Hi,
I am curious if there is a way to just use existing STL functions,
algorithms etc to accomplish the following loop (without a need to write
my own function). I know how to use some STL functions plus my own
function to replace the loop. But that unnecessarily makes code more
complicated. Any advice is much welcome. Thanks.
int nSize;
....
vector<int> v;
v.resize(nSize);
for (int i=0; i<nSize; i++)
v = i;
JD
I am curious if there is a way to just use existing STL functions,
algorithms etc to accomplish the following loop (without a need to write
my own function). I know how to use some STL functions plus my own
function to replace the loop. But that unnecessarily makes code more
complicated. Any advice is much welcome. Thanks.
int nSize;
....
vector<int> v;
v.resize(nSize);
for (int i=0; i<nSize; i++)
v = i;
JD