0

dynamic memory - arrays

int *p = NULL; // Pointer initialized with null p = new int[]; // Request memory delete [] p; // Delete array pointed to by p is this correct? (not declared array length)

16th May 2020, 6:48 PM
Kumudu_Mohottala
Kumudu_Mohottala - avatar
2 ответов
+ 2
You must specify length.
16th May 2020, 7:24 PM
Mustafa K.
Mustafa K. - avatar