Hi,
i have encountered a problem, i would like to remove element i from my list, which is of type vector.
I have the following code, within the declaration of my list (vector):
//create an array that holds one element, this is on the next line assigned to the element which i want to delete:
MyObject** o = new MyObject* [1];
//this should point to the object that i want to delete:
*o=getMyObject(i);
//this should remove it (but it gives me a run-time memory error)
list.erase(o);
any suggestions?
thanks,
xagiber