home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: disp.h for BC/C++ Yes/No? Where...Al Stevens...*.hpp?
- Message-ID: <1992Aug26.180434.8075@taumet.com>
- Organization: TauMetric Corporation
- References: <Bt9J3M.CHL@news.udel.edu> <78400@ut-emx.uucp>
- Date: Wed, 26 Aug 1992 18:04:34 GMT
- Lines: 56
-
- jamshid@ut-emx.uucp (Jamshid Afshar) writes:
-
- >>What does "*.hpp" stand for ???
-
- >Some C++ programmers use this extension instead of ".h" for their
- >header files. See the c.l.c++ FAQ (ftp sun.soe.clarkson.edu,
- >pub/C++/FAQ). I just use ".h" since there's not much reason to use a
- >different extension (you don't 'make' .h files) and I think most C++
- >programmers do also. ANSI C++ will probably use ".h" for any standard
- >C++ headers they introduce (confirmation?).
-
- Some compilers have used ".hpp", ".hxx", and ".h++" as file extensions
- for C++ headers, while others have just used ".h".
-
- The Standard will not address the subject of file names, since it is
- outside the language. Like the C Standard, it will just specify the
- form of character sequences to be used in #include directives to
- access the standard headers.
-
- A standard header is not necessarily a file. If it is a file, the
- character sequence appearing in the #include directive might be the
- same as the file name, but need not be.
-
- Example: #include <stdlib.h>
- 1. The compiler might recognize this reserved directive and just enable
- declarations internally without ever looking for any actual file.
- 2. There might be a file somewhere called "stdlib.h" which the
- compiler then reads in response to this directive.
- 3. There might be a file somewhere called "etaoin.shrdlu" which the
- compiler then reads in response to this directive.
- 4. There might be a single file somewhere which contains all the
- standard header declarations. This directive tells the compiler
- to read a certain portion of that file.
-
- I believe all of these schemes are currently in use in various compilers.
-
- Whether the Standard eventually mandated, for example, <iostream.h>
- <iostream.hpp>, <iostream.hxx>, <iostream.h++>, or anything else, it
- would make some vendors and users unhappy. Accordingly, we decided
- some time ago that the Standard C++ headers (iostreams, strings, and
- whatever else is standardized) will not have an extension in the
- include directive header name. That is, you will just write
- #include <iostream>
- This way we avoid offending only a few, and offend everyone equally :-)
-
- I think we can and should word the Standard so that a compiler would
- be allowed to accept
- #include <iostream.h>
- or
- #include <iostream.hpp>
- if it wished, so long as it also accepted
- #include <iostream>
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
- Vice Chair, ANSI C++ Committee, X3J16
-