Thing is that I have tried with memcpy, assign, copy_n, and copy, to no avail in the last two weeks by now. If you have an idea please use my code above to show me how to do it.
I want to describe my problem like this:
“You could, as I do, look upon allPathCoordinates(vector<vector<pair<int,int> > > allPathCoordinates;) as a dynamic 3d array with 9 rowss an unknown number of columns with different amount of integer pairs. What I want to keep is the 8th row intact with its unknown amount of integer pairs as the 3rd dimension.
That should be understood as if I'm not primarily interested in the elements i.e. the single first or second integer value in a pair. When having the 8th row extracted ( with memcpy, assign, copy_n, copy or some other better way) , I will iterate it to get the integer pairs (coordinates) for further use in a point() function like point[first][second]=Yellow;
Thanks for your interest.
Bo
As can be seen I have only reduced the number of elements with 7.Not what I wanted. I want to reduce the number of columns with 8 out of the totally 9.
}
Thank you cire for your quick answer.I did what you proposed and manipulated allPathCoordinates as required. You can see the code below. I am sorry to say that your proposition had no effect. The color of the paths are still purple and not yellow as I had hoped. Besides there are drawn 9 paths. None are erased.
if(allPathCoordinates.size()>0)
{
int l,m,n=0;
//allPathCoordinates.erase(allPathCoordinates.begin(),allPathCoordinates.begin()+2);
for (vector<vector<pair<int,int> > >::iterator it = allPathCoordinates.begin();
it!=allPathCoordinates.end();
it+=1)
{