how to avoid using another header file inside a header file?
From: Newsgroup - Ann (news_ann_at_yahoo.com)
Date: 11/02/03
- Next message: Artie Gold: "Re: how to avoid using another header file inside a header file?"
- Previous message: DrPizza: "Re: random_shuffle seed"
- Next in thread: Artie Gold: "Re: how to avoid using another header file inside a header file?"
- Reply: Artie Gold: "Re: how to avoid using another header file inside a header file?"
- Reply: Phlip: "Re: how to avoid using another header file inside a header file?"
- Reply: Moonlit: "Re: how to avoid using another header file inside a header file?"
- Reply: lilburne: "Re: how to avoid using another header file inside a header file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 1 Nov 2003 23:18:45 -0500
I have a library function like GetOptions( ..., struct net_arch_t netArch,
...) and put the declaration into a regular header file like getopt.h. But
this function declaration also needs the declaration of struct net_arch_t
which is located in another header file, e.g., nn.h. I saw somewhere that it
should be avoided to include another header file inside one header file. So
I am trying to use some other methods.
One option is for each source file that needs the GetOption function,
include both the getopt.h and nn.h and place nn.h ahead of the getopt.h. But
isn't it awkard? Is there any better way to do it? It happens some often to
me. Thanks.
Ann
- Next message: Artie Gold: "Re: how to avoid using another header file inside a header file?"
- Previous message: DrPizza: "Re: random_shuffle seed"
- Next in thread: Artie Gold: "Re: how to avoid using another header file inside a header file?"
- Reply: Artie Gold: "Re: how to avoid using another header file inside a header file?"
- Reply: Phlip: "Re: how to avoid using another header file inside a header file?"
- Reply: Moonlit: "Re: how to avoid using another header file inside a header file?"
- Reply: lilburne: "Re: how to avoid using another header file inside a header file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|