高级指针话题

    技术2022-05-19  22

    Pascal 语音的指针哲学:使用锤子可能会伤着你自己,所以我们不给你锤子。

     

    C语言的指针哲学:给你锤子,实际上你可以使用好几种锤子。祝你好运!

     

    C高级声明:

     

    1、int f;

     

    2、int *f;

     

    3、int*  f,g;

     

    4、int f();

     

    5、int *f();

     

    6、int (*f)();

     

    7、int *(*f)();

     

    8、int f[];

     

    9、int *f[];

     

    10、int f()[];

     

    11、int f[]();

     

    12、int (*f[])();

     

    13、int *(*f[])();

     

    看吧,一大堆呢。。。你能搞得清楚几个啊?说明下,上面有两个声明是非法的,哪两个?

     

    14、declare f as pointer to function returning pointer to array 10 of int .

    这个声明是什么样的呢???

     

    15、declare x as pointer to array 10 of pointer to function returning int.

    这个声明又是怎样的???

     

    我说了,除了晕还是晕啊!!!

     

    这就是所谓的高级指针话题。


    最新回复(0)