找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 257|回复: 1

Question6.9:Someone explained to me that arrays were really just constant pointers.

[复制链接]

210

主题

371

回帖

0

积分

管理员

积分
0
发表于 2013-7-10 21:33:21 | 显示全部楼层 |阅读模式

Q: Someone explained to me that arrays were really just constant pointers.
A: This is a bit of an oversimplification. An array name is ``constant'' in that it cannot be assigned to, but an array is not a pointer, as the discussion and pictures in question 6.2 should make clear. See also questions 6.3, 6.8, and 6.10.

210

主题

371

回帖

0

积分

管理员

积分
0
 楼主| 发表于 2013-7-10 21:37:37 | 显示全部楼层
问题:有人解释说数组就是常指针。
回答:这个有点过于简单化了。数组名是一个“常数”,是因为它不能被赋值。但是数组不是一个指针。问题6.2中的讨论和图片描述应该会很清楚的解释了。参考问题6.3、6.8和6.10。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

果子博客
扫码关注微信公众号

Archiver|手机版|小黑屋|风叶林

GMT+8, 2026-2-1 04:38 , Processed in 0.137368 second(s), 20 queries .

Powered by 风叶林

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表