免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: KBTiller
打印 上一主题 下一主题

特邀专家在线答疑——名不正则言不顺 一网打尽C语言基本概念 [复制链接]

论坛徽章:
0
231 [报告]
发表于 2011-05-20 18:25 |只看该作者
本帖最后由 hebingyue 于 2011-05-20 18:37 编辑

看了KBTiller的博客,关于指针的描述很棒。才知道数组还可以1[a]这样用,很崇拜啊。
在看k&R的经典c(第二版,84页), 数组a在c语言上是将其转换为*(a+i),没有想到可以推出*(i+a),然后推出i[a]。再次膜拜。

论坛徽章:
0
232 [报告]
发表于 2011-05-20 22:09 |只看该作者

论坛徽章:
0
233 [报告]
发表于 2011-05-21 10:01 |只看该作者
讨论C的时侯,总让我想起C++,楼主可以也一起讨论哦!
2007robot 发表于 2011-05-20 13:18



    呵呵,我担心那样范围太大,讨论可能会比较困难

论坛徽章:
0
234 [报告]
发表于 2011-05-21 10:02 |只看该作者
看了KBTiller的博客,关于指针的描述很棒。才知道数组还可以1[a]这样用,很崇拜啊。
在看k&R的经 ...
hebingyue 发表于 2011-05-20 18:25



    过奖。谢谢

论坛徽章:
0
235 [报告]
发表于 2011-05-21 10:06 |只看该作者

angle4 发表于 2011-05-20 22:09



    谢谢

论坛徽章:
0
236 [报告]
发表于 2011-05-21 10:08 |只看该作者
3.14
object
region of data storage in the execution environment, the contents of which can represent values

NOTE When referenced, an object may be interpreted as having a particular type; see 6.3.2.1.

数据对象
执行环境中的数据存储区间,其内容能表示值。

注:被引用时,数据对象可被解释为具有特定类型;见6.3.2.1

论坛徽章:
0
237 [报告]
发表于 2011-05-22 08:45 |只看该作者
3.15 parameter
formal parameter
formal argument (deprecated)
object declared as part of a function declaration or definition that acquires a value on entry to the function, or an identifier from the comma-separated list bounded by the parentheses immediately following the macro name in a function-like macro definition
形参
形参(formal parameter)
形参(formal argument)(废弃)
作为函数声明或定义一部分所声明的、进入函数时获得一个值的对象,或在类似函数的宏定义中,紧随宏名的圆括号内,被逗号所分隔的列表中的一个标识符。

论坛徽章:
0
238 [报告]
发表于 2011-05-22 23:02 |只看该作者
3.16
recommended practice
specification that is strongly recommended as being in keeping with the intent of the standard, but that may be impractical for some implementations

推荐做法
强烈推荐的规则,以保持与标准的意图相一致,但对某些实现来说可能并不可行

论坛徽章:
0
239 [报告]
发表于 2011-05-23 19:55 |只看该作者
3.17
value
precise meaning of the contents of an object when interpreted as having a specific type

被解释为具有特定类型时,数据对象中内容的明确意义

论坛徽章:
0
240 [报告]
发表于 2011-05-23 22:56 |只看该作者
回复 11# txdgtwpv

看你的编译类型了 如果用c++编译器应该能编译通过
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP