2011年3月3日
摘要: 预留 阅读全文
posted @ 2011-03-03 16:08 2-3^ 阅读(206) 评论(0) 推荐(0) 编辑
  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^ 阅读(571) 评论(0) 推荐(0) 编辑
  2011年2月27日
摘要: 用别名管理数组会给后期编写和调用带来很大的方便,尤其在以数组为参数的函数中更体现了优势。type TArr = array[0..255] of Byte; TArr2= array of TArr;var i, j, iCount : integer; //iCount 数组第一维元素个数 a : TArr2;begin iCount := 8; SetLength(a, iCount); for i:= 0 to iCount - 1 do for j:= 0 to 255 do a[i, j]:= i + j;end; 阅读全文
posted @ 2011-02-27 20:51 2-3^ 阅读(2320) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-02-27 14:58 2-3^ 阅读(223) 评论(0) 推荐(1) 编辑