int* array,*p; array =(int *)malloc(elem*sizeof(int)); p = array; while() { //此处代码不变 } return p; //这里返回p