Please tell me how to delete an element from a C++ array.
My teacher is setting its value to 0, is that correct?
If you're talking about a normal array, e.g.
int array[100];
then you can't "delete" an element, since the array always has 100 elements (in this example).
So it depends on the interpretation your program makes of the array values. If your teacher is consistently using a value of 0 to mean non-existent element, everything will work and so that's as correct as any other approach.