Please tell me how to delete an element from a C++ array.
My teacher is setting its value to 0, is that correct?
If the array is not intended to be sorted, a quick and easy way is to copy the last element to the position of the element to be deleted, then reduce the element count by 1.