为什么connot声明STRUCT或UNION的静态成员? [英] Why connot declare a static member of STRUCT or UNION?

查看:61
本文介绍了为什么connot声明STRUCT或UNION的静态成员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有何评论?谢谢。


Jim

Any comments? thanks.

Jim

推荐答案

ar ****** @ gmail.com 写道:

有何评论?谢谢。
Any comments? thanks.



请把你的问题放在帖子的正文中,不要大笑。


C isn' 'C ++。


-

Ian Collins。

Please put your question in the body of your post and don''t SHOUT.

C isn''t C++.

--
Ian Collins.


2007年10月22日星期一18:14:08 -0700, ar******@gmail.com 写在

comp.lang.c:
On Mon, 22 Oct 2007 18:14:08 -0700, ar******@gmail.com wrote in
comp.lang.c:

有何评论?谢谢。
Any comments? thanks.



因为C中没有STRUCT或UNION这样的东西。


-

Jack Klein

主页: http://JK-Technology.Com

常见问题解答

comp.lang.c http://c-faq.com/

comp.lang.c ++ http://www.parashift.com/c++-faq-lite/

alt.comp.lang.learn.c- c ++
http:// www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

Because there is no such thing as STRUCT or UNION in C.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html


文章< 11 ****** ****************@k35g2000prh.googlegroups .com> ;,

< ar ****** @ gmail.comwrote:
In article <11**********************@k35g2000prh.googlegroups .com>,
<ar******@gmail.comwrote:

>有何评论?谢谢。
>Any comments? thanks.



您期望它意味着什么?那个,在结构的情况下,

结构的其余部分会在结构

超出范围时丢失其值,但静态成员不会?那个,在一个工会的情况下,那个......那是什么?如果你上次通过静态成员写了

,那个值会被记住,但是如果你写的那个就不会被记住了。 br />
联盟通过一个非静态成员???

-

历史是一堆碎片 - Laurie Anderson

What would you expect it to mean? That, in the case of a struct,
that the rest of the struct would lose its values when the struct
went out of scope, but the static member would not? That, in
the case of a union, that... that what? That if you had last written
to it via the static member that the value would be remembered
but that it wouldn''t be remembered if you had written to the
union via one of the non-static members ???
--
"History is a pile of debris" -- Laurie Anderson


这篇关于为什么connot声明STRUCT或UNION的静态成员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆