Why does the below code gives Segmentation Fault

后端 未结 0 1623
伪装坚强ぢ
伪装坚强ぢ 2021-01-06 22:26

Creating dynamic 2D array in C++. of size X and Y.

int X = n+1;
int Y = W+1;
int** arr = new int* [X];
for(int i = 0; i <= n; ++i) {
    arr[i] = new int[Y         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题