0
Why does my code crash?
After I enter all 3 inputs into the array the program crashes and does not print the values why is this happening? confused https://code.sololearn.com/cV3d88V1uj1O/#cpp
1 Answer
+ 4
You have incorrectly initialized your ppp pointer, And its leaking somewhere.
Here is the correct way :
int*** ppp = new int** [len];
for(int i = 0; i<wid ; i++)
{ ppp[i] = new int* [wid];
for(int j =0; j<hei ; j++)
ppp[i][j] = new int [hei]; }