Re: About header files
- From: Christoph Scholtes <christoph.scholtes@xxxxxxxxx>
- Date: Thu, 29 Jun 2006 19:26:48 GMT
Richard Heathfield wrote:
Thus, I include the header files. main.c also uses stdlib.c
and stdio.h. Do I include them again or do I use inclusion guards to
check if they are already included (e.g. in functions.c)?
Include them as often as you like. They are already protected by inclusion guards.
And that is the case for all standard headers?
Do I HAVE to
declare the function prototype as extern in the header file?
No. For functions, it's the default, and it can be omitted. Indeed, it almost always /is/ omitted.
Interesting. Thank you.
Chris
.
- Follow-Ups:
- Re: About header files
- From: Eric Sosman
- Re: About header files
- From: Robert Gamble
- Re: About header files
- References:
- About header files
- From: Christoph Scholtes
- Re: About header files
- From: Richard Heathfield
- About header files
- Prev by Date: Re: Need to implement strdup, strnicmp and stricmp
- Next by Date: Re: Order of execution
- Previous by thread: Re: About header files
- Next by thread: Re: About header files
- Index(es):
Relevant Pages
|