A. Declarations are read by starting with the name and then reading in precedence order.
B.The precedence, from high to low, is:
B1. parentheses grouping together parts of a declaration
B2. the postfix operators:parentheses () indicating a function, and square brackets [] indicating an array.
B3. the prefix operator: the asterisk denoting "pointer to".
C. If a const and/or volatile keyword is next to a type specifier (e.g. int, long, etc.) it applies to the type specifier. Otherwise the const and/or volatile keyword applies to the pointer asterisk on its immediate left.
博客介绍了函数声明的读取方式,即从名称开始按优先级顺序读取。还说明了优先级从高到低依次为括号分组、后缀运算符(括号表示函数、方括号表示数组)、前缀运算符(星号表示指针)。此外,提到了 const 和 volatile 关键字的应用规则。
1万+

被折叠的 条评论
为什么被折叠?



