سؤال

I have following static 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];

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top