|
From: | jack |
Subject: | question about "new" and "delete" ? |
Date: | 5 Mar 2005 19:11:31 -0800 |
User-agent: | G2/0.2 |
the following code can be run and can generate result: a[9]=10; what happend there? int main() { double *a= new double[10]; for(int i=0;i<10;i++){ a[i]=i+1; } delete [] a; cout << a[9] << endl; return 0; }
[Prev in Thread] | Current Thread | [Next in Thread] |