int i;
int Input;
cin >> Input;
for(i = 0; i < Size ; i ++ )
if (List[i].PersonID == Input) {
}
I am trying to make a function that deletes a record from the array based on the id input provided. I am not sure what to do beyond this here. Will I also need to shift the values in the array after a record is removed?
Listis most probably notint, but rather a container ofint, what concrete type is it?Listis a user-defined class. The bigger question is is it a pointer or not? OP could simply set it to NULL as long as memory is freed. If he wants to resize his array (or simply bump things down) it's a little bit different (to resize, List will need to be dynamically allocated). Without knowing anymore context it's hard to give any concrete direction.