免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1617 | 回复: 2
打印 上一主题 下一主题

Pointer Generation [复制链接]

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:49:03
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-08 18:45 |只看该作者 |倒序浏览
A.7.1 Pointer Generation
If the type of an expression or subexpression is ``array of T,'' for some type T, then the value of the expression is a pointer to the first object in the array, and the type of the expression is altered to ``pointer to T.'' This conversion does not take place if the expression is in the operand of the unary & operator, or of ++, --, sizeof, or as the left operand of an assignment operator or the . operator. Similarly, an expression of type ``function returning T,'' except when used as the operand of the & operator, is converted to ``pointer to function returning T.''


懂得朋友可以跟我解释一下上面的意思吗? 看很久都看不明白


谢谢

[ 本帖最后由 shihyu 于 2007-6-12 02:38 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-06-08 19:10 |只看该作者
数组在某些地方被自动转换成指针对待,这段文字描述了这种情况,当然也简要说明了不适用的场合。

论坛徽章:
0
3 [报告]
发表于 2007-06-08 20:32 |只看该作者
对照 K&R2 pp. 200 上面的文字,本帖标题应作 “Pointer Generation”
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP