This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

动态数组



一开始,由于不确定数组长度,采用动态分配内存的方法构建了一个动态数组

之后,还要构建相同长度的数组,仍然需要动态分配内存,感觉太麻烦,而且CCS中动态分配内存的空间太小,

请问有没有一种方法,第一次确定数组长度后,之后在用这个长度构建数组时,不用去动态分配内存,求大神指导