Possible Duplicate:
C++ delete - It deletes my objects but I can still access the data?
Why doesn't delete destroy anything?
I've Created dynamic array, and I added values to the values of the array like that.
int *pArr;
pArr = new int[10];
for(int i=0;i<10;i++){
pArr[i] = i+2;
}
delete[] pArr;
// After deletion I can find the value of the array items.
cout << pArr[5] << endl;
As you see in the code above and in the last line, I can output the fifth element in the array without any problem . With that supposed to be the array has been removed.