Re: .h files



johnnash wrote:

Ok I have a doubt regarding .h files. I basically have two modules
in my software program - a.c and b.c

There is .h file called d.h. d.h contains prototypes of functions
in a.c so whenever i have to use functions of a.c i simply need to
include d.h. My question is can i also add the prototypes of
functions in b.c in d.h so that i only need to d.h in main.c so as
to access functions of both a.c and b.c.

No. You should match header files with source files, so each
expresses the external access permitted to the content of that
source file. You should have a.h an b.h, and #include the h files
for the units you use.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: .h files
    ... in my software program - a.c and b.c ... d.h contains prototypes of functions ... You should match header files with source files, ... defined in separate source modules. ...
    (comp.lang.c)
  • Re: .h files
    ... in my software program - a.c and b.c ... d.h contains prototypes of functions ... You should match header files with source files, ... defined in separate source modules. ...
    (comp.lang.c)
  • Re: [git pull] AMD-IOMMU (AMD-Vi) updates for 2.6.32
    ... function prototypes belong into amd_iommu.h, ... The plan is to do it the other way around. ... contains the driver exported function prototypes and the ... The prototypes I put into source files should ...
    (Linux-Kernel)
  • Re: [git pull] AMD-IOMMU (AMD-Vi) updates for 2.6.32
    ... function prototypes belong into amd_iommu.h, ... The plan is to do it the other way around. ... contains the driver exported function prototypes and the ... The prototypes I put into source files should ...
    (Linux-Kernel)
  • Re: .h files
    ... my software program - ... My question is can i also add the prototypes of functions ... Free games and programming goodies. ...
    (comp.lang.c)