S
steflhermitte
Dear cpp-ians,
I have created a list of vectors and its iterator:
list < vector <long double> > listValues;
list < vector <long double> >::iterator itListValues;
but I don't know how to access the elements of that list.
I have a list of vectors with 4 elements. The size of my list is 500,
the size of every vector is 4.
How do I move around in that list of vectors?
E.g:
When I want to access the elements in my list that are the fourth
element in my vector?
for (itListValues = listValues.begin()[4];
itListValues < listValues.end()[4]; itListValues++)
{ *itListValues; }
This is not correct, but I don't know how to write it differently to
access the individual values of my list of vectors. Any advice?
Thank you in advance,
Stef
I have created a list of vectors and its iterator:
list < vector <long double> > listValues;
list < vector <long double> >::iterator itListValues;
but I don't know how to access the elements of that list.
I have a list of vectors with 4 elements. The size of my list is 500,
the size of every vector is 4.
How do I move around in that list of vectors?
E.g:
When I want to access the elements in my list that are the fourth
element in my vector?
for (itListValues = listValues.begin()[4];
itListValues < listValues.end()[4]; itListValues++)
{ *itListValues; }
This is not correct, but I don't know how to write it differently to
access the individual values of my list of vectors. Any advice?
Thank you in advance,
Stef