please help me. I can't find how it's done.
if I have this:
if I have myVars filled with elements and I have:Code:struct IT { int x, int y; }; vector<IT*>myVars;
how can I delete the element i?Code:vector<IT*>::iterator i; //somewhere here i gets to be one of the elements
erase() doesn't work well because it is a pointer to IT.
"delete i;" doesn't work.
please tell me how I can delete an element, if it is a pointer, and I only have an iterator to it.




Reply With Quote