?? ia.h
字號:
/***********************************
* 無限數組(ia)的定義 *
* *
*無限數組是根據需要能夠擴大的數組 *
*在數組中添加更多的元素 *
* 僅僅引起數組的增大 *
*---------------------------------*
* class infinite_array *
* 成員函數 *
* infinite_array() *
* ---默認的構造函數 *
* ....... *
* int& operator [](int index) *
* 獲取無限數組中的一個元素 *
***********************************/
#include <string.h>
//無限數組的每一個單元中存儲的元素
const unsigned int BLOCK_SIZE = 10;
class infinite_array{
private:
//該塊的數據
int data[BLOCK_SIZE];
//指向下一個數組的指針
class infinite_array *next;
public:
//默認的構造函數
infinite_array()
{
next = NULL;
memset(data, '\0', sizeof(data));
}
~infinite_array();
int& operator[](const unsigned int index);
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -