在C语言和C++等语言中,数组元素全为指针变量的数组称为指针数组,指针数组中的元素都必须具有相同的存储类型、指向相同数据类型的指针变量。指针数组比较适合用来指向若干个字符串,使字符串处理更加方便、灵活。一维指针数组的定义形式为:“类型名 *数组标识符[数组长度]”。
我如何存储一个对象的函数指针数组?
第一部份是设置:建立一个函数指针数组。
The first part of this is the setup: the creation of an array of function pointers.
每个“数据库”包含一个指针数组,里面指针指向数据库里的表。
Each "database" contains an array of Pointers to the tables inside the database.
Which may take up some arbitrary amount of memory. In that case, I'm back to this problem.
然后将接下来的每一个内存块设置为,指向数组对应元素值的指针。
应用推荐