經安全檢測,此網站為安全網站,請放心前往原始網址!

c++ - Use new operator to initialise an array - Stack Overflow

2012年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

網址安全性掃描由 google 提供