This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: STL headers problem


Jordi de Antonio bruited (on 22Jul):
| What's the difference between header files whit '.h' and without (p.e.
| <vector.h> and <vector>). I've always used '.h' one's, but now I'm
| having troube while porting the system to Visual C++ that doesn't have
| '.h' versions. I would like to know the difference before start to do
| changes.

A header file is a plain ascii file, designed to be included at the
head, or beginning, of some other file.  You can call it header,
header.h, h.header, header.jordi, or whatever makes you happy.

The .h is merely a convention, it has no actual syntactic meaning.
OTOH, I have never seen a header file that did not have a .h extension,
nor seen a file.h that was anything other than a header file.

Especially not when using the <file.h> notation, which tells any compiler
to find file.h in /usr/include.  In /usr/include I see only .h files, or
subdirectories with .h files.


-- 
Jean-Pierre Radley <jpr@jpr.com>  XC/XT Custodian   Sysop, CompuServe SCOForum


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]