The standard c99 dictates a maximum of 15 nested levels for include files.
It would be a waste of resources to include the same file twice.
If you look at your own header files in the header directory you'll
more than likely notice that each header defines itself thus,
Code:
/*
header1.h
*/
#define _HEADER1_H_
Knowing this we could now do something like,
Code:
/*
header2.h
*/
#define _HEADER2_H_
#ifndef _HEADER1_H_
#include "header1.h"
#endif
The preprocessor would then determine whether or not
header1.h has already been included and proceed accordingly.
Note that you shouldn't really use the leading underscore as
the standard suggests that _[any] are reserved identifiers so
HEADER1_H_ could be an alternative option.
Hope that helps.