+ 3

2 D dynamic arrays

Is it ok if we do not have any values for the rows and columns in a 2 D dynamic array from the point of view of memory allocation

23rd Apr 2019, 2:17 PM
Sanjay Kamath
Sanjay Kamath - avatar
1 Antwort
0
I do think it’s fine, even if you access the unitialized value, it might contains random value. My tip here is, after allocating the memory, initialize the default value.
24th Apr 2019, 1:26 AM
Owenizedd
Owenizedd - avatar