hi, I am getting runtimes errors sometimes and cant figure out why, that i am pointing on wrong memory.
i have got this terrible interface. I think there can be problem with saving objects to vector and my copy constructor, or iterator. And i am not sure if i am saving those files correctly.
Thanks for any help.
I have class Airport which has vector of planes.
bool airport::addPlane(const plane& p) //funcction to add planes into vector
planeIterator = planes.begin(); //if vector empty put iterator on first object
const plane* airport::getCurrentPlane() const // get the current object on which is iterator pointing has to be const pointer on plane
plane *p1 = new plane(*planeIterator);
//here is my copy constructor from plane class
plane::plane(const plane& other)
_hasLanded = other._hasLanded;