• 3062阅读
  • 1回复

Question6.9:Someone explained to me that arrays were really just constant pointers. [复制链接]

上一主题 下一主题
离线那个谁
 

只看楼主 倒序阅读 使用道具 楼主  发表于: 2013-07-10
— 本帖被 tyrone2497谁 执行加亮操作(2013-07-19) —

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.
离线那个谁

只看该作者 沙发  发表于: 2013-07-10
问题:有人解释说数组就是常指针。
回答:这个有点过于简单化了。数组名是一个“常数”,是因为它不能被赋值。但是数组不是一个指针。问题6.2中的讨论和图片描述应该会很清楚的解释了。参考问题6.3、6.8和6.10。
快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个