c++中,怎样用动态分配的内存来存数组

2025-02-24 11:01:39
推荐回答(1个)
回答1:

int length = 20;
int *array = new int[length];

array就是动态分配的内存的长度为length的int数组首地址