在C语言和C++等语言中,数组元素全为指针变量的数组称为指针数组,指针数组中的元素都必须具有相同的存储类型、指向相同数据类型的指针变量。指针数组比较适合用来指向若干个字符串,使字符串处理更加方便、灵活。一维指针数组的定义形式为:“类型名 *数组标识符[数组长度]”。
索引包含一个节点,该节点是一个小型的指针数组,这些指针又指向更低的层。
The index contains a node that is a small array of Pointers to the lower level.
每个小块便是相应层的指针数组的直接索引:最左边的小块指向第一层节点,第二个小块指向第二层的节点,依此类推。
Each chunk is a direct index to the pointer array of the corresponding level: the first left-hand-side chunk to the first-level nodes, the second chunk to the nodes of the second level, and so on.
第一部份是设置:建立一个函数指针数组。
The first part of this is the setup: the creation of an array of function pointers.
Which may take up some arbitrary amount of memory. In that case, I'm back to this problem.
然后将接下来的每一个内存块设置为,指向数组对应元素值的指针。
应用推荐