Why does'nt the delete keyword destroy all of the allocated array and not just the first element.As it is even after the delete[] the second cout still prints out the values of the "t" array.
Any idea ?
int main()
{
int *t =0;
t = new int [10];
t[0] = 3;
t[1] = 7;
cout<<t[0]<<" "<<t[1]<<endl;
delete[] t;
cout<<t[0]<<" "<<t[1]<<endl;
cin.get();
return 0;
}