二维阵列中元素对应的位址.PPTVIP

  • 1
  • 0
  • 约7.31千字
  • 约 28页
  • 2018-02-09 发布于天津
  • 举报
二维阵列中元素对应的位址

Chap 2 Array (陣列) 抽象資料型態 C++中, 類別(class)包含四個元件: 類別名稱 資料成員 : the data that makes up the class 成員函數 : the set of operations that may be applied to the objects of class 程式可被使用程度 : public, protected and private. Definition of Rectangle #ifndef RECTANGLE_H #define RECTANGLE_H Class Rectangle{ Public: Rectangle(); ~Rectangle(); int GetHeight(); int GetWidth(); Private: int xLow, yLow, height, width; }; #endif Array 0 1 2 3 0 1 2 A[0][0] A[0][1] A[0][2] A[0][3] A[1][0] A[1][1] A[1][2] A[1][3] 映射: A[i][j]=A[0][0]+i*4+j A[2][1] char A[3][4]; // row-major 邏輯結構 實際結構

文档评论(0)

1亿VIP精品文档

相关文档