Mail Archives: djgpp/1998/06/03/23:57:02
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 -