Re: struct question
From: pete (pfiland_at_mindspring.com)
Date: 08/06/04
- Next message: Mabden: "Re: Null pointers"
- Previous message: Sai Kumar: "Where can i get the sufficient material for Embedded C"
- In reply to: CBFalconer: "Re: struct question"
- Next in thread: Emmanuel Delahaye: "Re: struct question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 06 Aug 2004 10:58:29 GMT
CBFalconer wrote:
>
> pete wrote:
> >
> ... snip ...
> >
> > For matched pairs of .c and .h files:
> > I am inclined not to put extern object declarations in a header.
> You won't go wrong if you consider the .h file as a means of
> publicizing those portions of the .c file you want to make
> accessible to other compilation units. Thus you declare and
> define the objects in the .c file. If the objects are NOT to be
> accessible externally you mark them static. If they ARE to be
> accessible externally you declare them in the .h file, and use the
> extern keyword for objects other than function prototypes.
The more I think about what you wrote, the more I like it.
-- pete
- Next message: Mabden: "Re: Null pointers"
- Previous message: Sai Kumar: "Where can i get the sufficient material for Embedded C"
- In reply to: CBFalconer: "Re: struct question"
- Next in thread: Emmanuel Delahaye: "Re: struct question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|