#include <iostream> using namespace std; int main() { int row = 4, col = 5; // key code: 申请空间 int **edge = (int **) new int *[row]; for (int i = 0; i < row; i++) { edge[i] = new int[col]; } for (int i = 0; i < row; i++) { cout << endl; for (int j = 0; j < col; j++) { edge[i][j] = rand()%100; cout << edge[i][j] << " "; } } return 0; }