A couple of things:
1) you have
If the delete takes place, p2 is pointing to deleted memory. Also, what is theCode:if((*planeIteratorMoj)->move()) { delete *planeIteratorMoj; } plane * p2 = (*planeIteratorMoj);
purpose of p2 here ?
2) You do not need the copy constructor
3) in addPlane, what is the purpose of the "planes.empty()" check ?




Reply With Quote