int b[2]={2,3};
int c[2]={4,5};
int **p,**q,**m;
q=new int*[2];
q[0]=new int;
q[1]=new int;
**q=c[0];
*(*q+1)=c[1];
delete q[0];
delete q[1];
delete []q;
q=(int**)malloc(sizeof(int*)*2);
q[0]=(int*)malloc(sizeof(int));
q[1]=(int*)malloc(sizeof(int));
**q=b[0];
*(*q+1)=b[1];
free(q[0]);
free(q[1]);
free(q);
q=(int**)malloc(sizeof(int*));
q[0]=(int*)malloc(sizeof(int)*2);
q[0][0]=c[0];
q[0][1]=c[1];
free(q[0]);
free(q);
时间: 2024-10-22 13:45:29