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

Question6.22:How can code in a file where an array is declared as extern。。。

[复制链接]

210

主题

371

回帖

0

积分

管理员

积分
0
发表于 2013-7-1 13:37:01 | 显示全部楼层 |阅读模式

Q: How can code in a file where an array is declared as extern (i.e. it is defined, and its size determined, in some other file) determine the size of the array? sizeof doesn't seem to work.
A: See question 1.24.

210

主题

371

回帖

0

积分

管理员

积分
0
 楼主| 发表于 2013-7-1 13:42:02 | 显示全部楼层
问题:代码如何判断一个用extern声明的数组的大小?(例如:它在另一个文件中定义,并且大小也确定了)sizeof此时不起作用了。
回答:参考问题1.24。

14

主题

65

回帖

0

积分

新手上路

积分
0
发表于 2013-7-2 00:21:19 | 显示全部楼层
应该是退化成指针了。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

GMT+8, 2026-2-1 05:54 , Processed in 0.140314 second(s), 20 queries .

Powered by 风叶林

© 2001-2026 Discuz! Team.

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