c 二级指针

Posted libing029

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c 二级指针相关的知识,希望对你有一定的参考价值。

二级指针 指针的指针

 

1 typedef struct{
 int age;
 char name[20]; 
}Person;

int main(){
  Person** p=(Person**)malloc(sizeof(Person*)*num);//定义一个存放Person结构体指针长度为num大小的数组,数组存放元素为指针
  Person* per=(Person*)malloc(sizeof(Person));
  p[0]=per;
}




 















以上是关于c 二级指针的主要内容,如果未能解决你的问题,请参考以下文章