开发者

How do I allocate memory by using new in C++?

开发者 https://www.devze.com 2023-04-13 09:09 出处:网络
I have following s开发者_C百科tatic declaration of memory: void* array[5000]; How I can allocate the same memory using operator new in C++?void **array = new void*[5000];

I have following s开发者_C百科tatic declaration of memory:

void* array[5000];

How I can allocate the same memory using operator new in C++?


void **array = new void*[5000];


at above there is array of pointers here is just an array of Integer.

int array = new int [5000];

0

精彩评论

暂无评论...
验证码 换一张
取 消