2011年2月28日
摘要: 怎样给多维数组动态分配内存//Allocate:int **p = new int* [m];for(int i = 0 ; i < m ; i++) p[i] = new int[n];//Use:for(int i = 0 ; i < m; i++) for(int j = 0 ; j < n ; j++) p[i][j] = i * j;//Free:for(int i = 0 ; i < m ; i++) delete[] p[i];delete[] p;1. 演示形为int[2][3]的二维动态数组/////////////////////////////// 阅读全文
posted @ 2011-02-28 23:12 2-3^ 阅读(572) 评论(0) 推荐(0) 编辑