delete operator accepts only pointers, so line 1 will not compile.
Line 2 is trying to delete the memory for a variable in the stack.
On line 3 delete [] needs to be used.
On line 5, everything is OK - a null pointer is passed to the delete operator.
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати