- 3
- 0
- 约2.36万字
- 约 16页
- 2020-05-14 发布于安徽
- 举报
超强的指针学习笔记
C 语言所有复杂的指针声明,都是由各种声明嵌套构成的。如何解读复杂指针声明呢?右
左法则是一个既著名又常用的方法。 不过, 右左 法则其实并不是 C 标 准里面的内容, 它是
从 C 标准的声明规定中归纳出来的方法。 C 标准的声明规则,是用来解决如何创建声明的,
而右左法则是用来解决如何辩 识一个声明的, 两者可 以说是相反的。 右左法则的英文原文
是这样说的:
The right-left rule: Start reading the declaration from the innermost parenthe
ses, go right, and then go left. When you encounter parentheses, the direction
should be reversed. Once everything in the parentheses has been parsed, jump ou
t of it. Continue till the whole declaration has been parsed.
原创力文档

文档评论(0)