Arun Kumar Singh
October 24th, 2001, 11:52 PM
I have a small doubt .what is the need to include the same header file multiple times in various source files .
eg
Header file-header.h
#ifndef _HEADER
#define _HEADER
int *myfunc(void,void);
#endif
source file -one.c
#include "header.h"
now to use this func declared in header.h in two.c why do i need to include it again
for eg.
two.c
#include "header.h"
....
....
my doubt is this -when i have already included header.h in one.c why do i need to include it again in two.c because inclusion again shall not be effective b'cos of #ifndef statement at the start of header file header.h
not including it again gives an error .
eg
Header file-header.h
#ifndef _HEADER
#define _HEADER
int *myfunc(void,void);
#endif
source file -one.c
#include "header.h"
now to use this func declared in header.h in two.c why do i need to include it again
for eg.
two.c
#include "header.h"
....
....
my doubt is this -when i have already included header.h in one.c why do i need to include it again in two.c because inclusion again shall not be effective b'cos of #ifndef statement at the start of header file header.h
not including it again gives an error .