问题描述
使用关键字struct,我们可以简单地通过以下方式进行前向声明:
struct struct_a;
但如果我们输入它:
typdef struct struct_a struct_a_t;
当我们需要使用struct_a_t但十字架时包含发生,如何
告诉编译器struct_a_t是一个类型?好像是:
类型struct_a_t;
谢谢。
ABAI
- -
comp.lang.c.moderated - 审核地址: - 你必须
在您的标题中有适当的新闻组行,以便查看您的邮件,
或主题行中方括号中的新闻组名称。对不起。
Hi,
With keyword struct, we can simply do forward declare by:
struct struct_a;
but if we typedef it:
typdef struct struct_a struct_a_t;
When we need to use struct_a_t but the cross include occurs, how to
tell compiler that struct_a_t is a type? seems like:
type struct_a_t;
Thanks.
ABAI
--
comp.lang.c.moderated - moderation address: cl**@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
推荐答案
-
comp.lang.c.moderated - 审核地址: - 您必须
在您的标题中有适当的新闻组行,以便查看您的邮件,
或主题行中方括号中的新闻组名称。对不起。
--
comp.lang.c.moderated - moderation address: cl**@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
这是我经常停止阅读的地方。
我可以忍受偶尔的拼写错误,我可以使用明显的
语言Defizit,但技术新闻组中的小孩谈话是难以忍受的。
我希望你永远不需要问一个我能回答的问题。 br $>
-
Josef M?llers(Pinguinpfleger bei FSC)
如果失败没有罚款成功将不会是奖金
- T. Pratchett
-
comp.lang.c.moderated - 审核地址: - 您必须
在您的标题中有适当的新闻组行,以便查看您的邮件,
或主题行中方括号中的新闻组名称。抱歉。
This is where I usually stop reading.
I can live with the occasional speling eror, I can live with the obvious
language Defizit, but kiddie talk in a technical newsgroup is unbearable.
I hope you never need to ask a question I could answer.
--
Josef M?llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
--
comp.lang.c.moderated - moderation address: cl**@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
我可以请你在usenet上避免发短信吗? -
令人愤怒的尝试和阅读。
谢谢,
Eric
-
comp.lang.c.moderated - 审核地址: - 你必须
在您的标题中有一个适当的新闻组行,以便查看您的邮件,
或主题行中方括号中的新闻组名称。对不起。
Could I ask you to PLEASE refrain from text messaging on usenet? - its
infuriating to try and read.
Thanks,
Eric
--
comp.lang.c.moderated - moderation address: cl**@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
这篇关于typedef forward声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!