|  | c++ - Use new operator to initialise an array - Stack Overflow2012年3月7日 -  You can use memcpy after the allocation. int originalArray[] ={1,2,3,4,5,6,7,8,9,10} ; int *array = new int[10]; memcpy(array, originalArray, 10*sizeof(int) ) ... stackoverflow.com |  |