delete array; not delete [] array;delete [] arr;
is equivalant to
delete arr[0]; delete arr[1]; ... delete arr[k];
------------------------------------------------
defination from msdn:
The delete operator destroys the object created with new by deallocating the memory associated with the object.
------------------------------------------------
however your array is array of primative type bool
now try this
Class Bool
{
public bool myBool;
};
Bool *flag2 = new Bool[8];
delete [] flat2;
do u mean
"delete [] arr" deletes each cell
and
"delete arr" deletes the pointer itself
after "delete [] arr", the pointer "arr" still exists
and
"delete arr" deletes the pointer itself
after "delete [] arr", the pointer "arr" still exists