int var1 = 5;
//delete var1; // Bad
int* var2 = newint(5);
delete var2; // Good
int myArray1[] = {1,2,3,4};
//delete myArray1; // Bad
//delete myArray1[2]; // Bad
//delete[] myArray1; // Bad
int* myArray2 = newint[4];
//delete myArray2; // Bad
delete[] myArray2; // Good
New allocates on the heap instead of on the stack. You can't simply delete an element from a static array. You could give it an "deleted" value though like -1 or something. Then if you try and use that value display an error message or something.