ericshufro@[EMAIL PROTECTED]
wrote:
> Similar to prototyping functions,
Erm... we have a terminology mixup here. What you're talking about is
not prototyping, but "forward declaration".
> the reason we ask this question is to determine whether we can
> resolve circular definition situations that occur when ordering
> header files which have data type definitions each dependent on the
> other.
Even if you could, that would be rather obviously the wrong approach to
the problem. A much better approach, IMHO the only sensible one at all,
is to not allow such mutual dependencies of headers, period.
> If SOME_STRUCT_NAME can be "prototyped" in a header PRIOR to
> 'header_a.h', then that structure name can be referenced in other
> header files PRIOR to its actual data type definition.
You're looking too hard at typedefs. What you want to do is use the
"struct struct_tag_name" way of referring to a struct. And yes, you can
forward-declare it:
struct struct_tag_name;
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- 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.


|