指针数组例子

在C语言和C++语言中,数组元素全为指针的数组称为指针数组。 一维指针数组的定义形式为:“类型名 *数组标识符[数组长度]”。 例如,一个一维指针数组的定义:int *ptr_array[10]。 在本例子中的Point *pa[2]是由pa[0]和pa[1]两个指针组成。 #include using namespace std; int main() { int line1[] = { 1,
相关文章
相关标签/搜索