c - volatile 和 const 指针

标签 c pointers constants volatile

我看到了这段代码

const volatile int * volatile * const X;

但是我不明白第二个*是什么意思。

我明白了

const volatile int * volatile const X;

表示指向易失常量数据的易失常量整数指针。

最佳答案

了解重要的 C 声明的有用站点是 cdecl.org .

描述:

const volatile int * volatile * const X;

cdecl 是:

declare X as const pointer to volatile pointer to const volatile int

关于c - volatile 和 const 指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9889974/

相关文章:

c - 运行时数组初始化

C 命令行参数

c - 将返回的指针分配给数组

c++ - Qt 通过 const 引用传递——效率更高吗?为什么?

c++ - VS2010 中令人困惑的 std::string::c_str() 行为

从头文件调用c中的插入函数

命令行参数写入 make 文件

c++ - const 参数 vs const 引用参数

c - 如何知道何时使用单链表或接地头链表

c - 是否可以在 C 中为 uint64_t 指针添加下标?