delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/03/16:51:32

From: mmatten AT aol DOT com (MMatten)
Newsgroups: comp.os.msdos.djgpp
Subject: Could someone please explain?
Lines: 22
Message-ID: <1998060320000300.QAA05509@ladder01.news.aol.com>
NNTP-Posting-Host: ladder01.news.aol.com
Date: 03 Jun 1998 20:00:03 GMT
Organization: AOL, http://www.aol.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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?

Thanks.

Mark Matten.

- Raw text -


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