for(io=ref; io<i; io++){
mObject[io].setRadius(mObject[(io+1)].getRadius());
mObject[io].setType(mObject[(io+1)].getType());
mObject[io].setName(mObject[(io+1)].getName());
}
I am a beginner at programming, and my program keeps crashing everytime it gets to this part of code, but it compiles fine.
I have an array of objects, and I want to delete one of them. So basically I am trying to set the name, radius and type variables of the object that I want to delete to be equal to name, radius and type variables of the next object in the array, and then move all the other objects down one space in the array.
Thanks for your help
mObject[io].setRadius(mObject[(io+1)].getRadius());
mObject[io].setType(mObject[(io+1)].getType());
mObject[io].setName(mObject[(io+1)].getName());
}
I am a beginner at programming, and my program keeps crashing everytime it gets to this part of code, but it compiles fine.
I have an array of objects, and I want to delete one of them. So basically I am trying to set the name, radius and type variables of the object that I want to delete to be equal to name, radius and type variables of the next object in the array, and then move all the other objects down one space in the array.
Thanks for your help
