简体   繁体   English

volatile和const指针

[英]volatile and const pointer

I saw this code snippet 我看到了这段代码

const volatile int * volatile * const X;

but I can't understand what does the second * means. 但我无法理解第二个*意味着什么。

I understand that 我明白那个

const volatile int * volatile const X; const volatile int * volatile const X;

means a volatile const integer pointer to a volatile const data. 表示易失性const数据的volatile整数指针。

A useful site for understanding non-trivial C declarations is cdecl.org . 用于理解非平凡C 语句的有用站点是cdecl.org

The description for: 描述:

const volatile int * volatile * const X;

from cdecl is: 来自cdecl是:

declare X as const pointer to volatile pointer to const volatile int 将X声明为指向const volatile int的volatile指针的const指针

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM