delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/03/23:57:02

Mime-Version: 1.0
To: mmatten AT aol DOT com (MMatten), djgpp AT delorie DOT com
From: Nate Eldredge <nate AT cartsys DOT com>
Subject: Re: Could someone please explain?
Date: Wed, 3 Jun 1998 16:57:38 -0700
Message-ID: <19980603235734.AAB6210@ppp104.cartsys.com>

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



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019