int * const * p和int ** const p之间有什么区别

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了int * const * p和int ** const p之间有什么区别相关的知识,希望对你有一定的参考价值。

#include <stdio.h>
    int main()
    {
        int i = 11;
        int *p = &i;
        foo(&p);
        printf("%d ", *p);
    }
    void foo(int *const *p)
    {
        int j = 10;
        *p = &j;
        printf("%d ", **p);
    }

FOO函数中的参数如何操作,int * const *和int ** const是相同的东西?

答案

这可以帮助您回答:Clockwise/Spiral Rule

以上是关于int * const * p和int ** const p之间有什么区别的主要内容,如果未能解决你的问题,请参考以下文章