This tidbit might help you, albeit it shows you an example of arrays of ints, so if you're doing an array of custom class objects, you'll have to do a little more footwork on that.
It is an array of objects, basically I have an array which holds all the patients that are checked in, and I have a function which checks out patients. When I check out a patient, I need to remove the object from the array since it is no longer checked in.
I did this at first:
checkIn[i] = checkIn[i+1]
This shifts the array by 1 index which ultimately overwrites the index I want removed, is this method correct?
Sounds like it should work if you also have a variable that keeps track of how many patients you have. When you remove a patient you should not forget to decrement this variable.