第37课 指针阅读技巧分析

问题:

指针阅读技巧解析:

示例:

 1 #include <stdio.h>
 2 
 3 int main()
 4 { 
 5     int (*p1)(int*, int (*f)(int*));
 6     
 7     int (*p2[5])(int*);
 8     
 9     int (*(*p3)[5])(int*);
10 
11     int*(*(*p4)(int*))(int*);
12     
13     int (*(*p5)(int*))[5];
14 
15     return 0;
16 }

解析如下:

最后一个指针p5用typedef定义如下:

工程中复杂指针尽量用typedef定义。

小结:

原文地址:https://www.cnblogs.com/wanmeishenghuo/p/9551221.html