Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: mmatten AT aol DOT com (MMatten), djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Could someone please explain? Date: Wed, 3 Jun 1998 16:57:38 -0700 Message-ID: <19980603235734.AAB6210@ppp104.cartsys.com> Precedence: bulk At 08:00 6/3/1998 GMT, MMatten wrote: >I have this strange (or not) problem whilst compiling C and C++. > >Is it still true, that in ANSI C, prototypes are recomended, but not >compulsory, >whilst in C++ they are compulsory? > >The problem is that if I use a function such as 'strlen' and do not explicitly >include >the headers file (string.h), it gets included anyway. I know that it is because >I included a conditional compilation construct to test for >'__dj_include_string_h_'. >e.g. >#ifdef __dj_include_string_h_ > cout << "Its included!\n"; >#endif > >Could some one please explain how the header files are being included in the >compile, or whether I'm just mad? Many DJGPP header files include each other. This, AFAIK, is not a problem, because no ANSI header will include any non-ANSI header. Not including header files is a really bad idea, so just do it. Nate Eldredge nate AT cartsys DOT com