Please tell me how to delete an element from a C++ array.
My teacher is setting its value to 0, is that correct?
解决方案
You can't really "delete" an element from a C++ array.
However, if the array consists of pointers, you can delete the object that a specific element points to.
In your teacher's case, it will be important to make note of whether the objects of the array are dynamically allocated (using the new operator in C++) or not. He may simply be setting his values to 0 as an indicator that the value is no longer valid.
Without actual source code, this is as much as I can help you with.