include <stdio.h>
int main(void)
{
int i = 10;
int *p = &i;
int **q = &p;
int ***r = &q;
printf("i = %d\n", ***r);
return 0;
}
输出结果是:
i = 10
为什么最后要用三级指针,是因为q的类型为二级指针
int main(void)
{
int i = 10;
int *p = &i;
int **q = &p;
int ***r = &q;
printf("i = %d\n", ***r);
return 0;
}
输出结果是:
i = 10
为什么最后要用三级指针,是因为q的类型为二级指针
本文标题:iOS开发笔记-多级指针
本文链接:https://www.haomeiwen.com/subject/tituyqtx.html
网友评论