b***y 发帖数: 2799 | 1 ☆─────────────────────────────────────☆
baodong (馋懒大魔包) 于 (Thu Sep 1 16:11:25 2005) 提到:
Hello, I am a newbie of C++. Thanks for your time.
Who can tell me why the following code gives a funny error? It works if I use
delete [] a,b; What is the differenc of delete [] a,b; and delete [] a;
delete [] b;
What will the compiler do with a = new double [0]?
Many thanks
int main(void)
{
for (int j=0; j<5; j++)
{
double *a, *b;
a = new double [j];
b = new double [3];
|
|