#inlcude<malloc.h> malloc,free new,delete int *a; C语言: a=(int *)malloc(sizeof(int)*2);//相当于:a[2] free(a); C++语言: a=new int[2];//相当于:a[2] delete(a);