Re: all.h
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Mon, 10 Mar 2008 10:05:11 +1300
Ed Prochak wrote:
On Mar 9, 8:01 am, atindra...@xxxxxxxxx wrote:
suppose my source code is divided into several modules and there are
many header files like a.h, b.h, c.h, d.h. It is possible that one .c
file say d.c needs b.h and c.h, c.c may need a.h and so on. lot of
dependencies. In such a case, is it better to have a single header
file "all.h" like this -
all.h
#include "a.h"
#include "b.h"
#include "c.h"
#include "d.h"
Then include this all.h in all the .c files ??
NOoooo! It is not better.
Just consider two modules, A and C that happen to define functions of
the same name, foo(), or macros of the same name, or any other
possible collisions.
When such collisions happen, it is not pretty because it does not
always cause a compile error.
It should.
--
Ian Collins.
.
- Prev by Date: Re: rand and srand
- Next by Date: Re: rand and srand
- Previous by thread: Re: all.h
- Next by thread: Re: all.h
- Index(es):