int N = 10; int** G; //初始化 G = new int*[N]; for (int i = 0; i < N; i++) G[i] = new int[N]; //删除 for (int i = 0; i < N; i++) delete G[i]; delete G;
原文地址:https://www.cnblogs.com/lxc1910/p/8992327.html
时间: 2024-11-09 04:24:18
int N = 10; int** G; //初始化 G = new int*[N]; for (int i = 0; i < N; i++) G[i] = new int[N]; //删除 for (int i = 0; i < N; i++) delete G[i]; delete G;
原文地址:https://www.cnblogs.com/lxc1910/p/8992327.html