M
Mark Sullivan
What is the difference between the extensions *.hxx and just *.h for header files ?
Can they co-exist?
Mark
Can they co-exist?
Mark
Mark said:What is the difference between the extensions *.hxx and just *.h for header files ?
Can they co-exist?
What is the difference between the extensions *.hxx and just *.h for header files ?
Can they co-exist?
Mark
Mark said:What is the difference between the extensions *.hxx and just *.h for
header files ? Can they co-exist?
Mark
Mark said:What is the difference between the extensions *.hxx and just *.h for
header files ?
Can they co-exist?
There are a few *.h files who's content is defined by some standard. Other
than that, it is only customary (i.e. a convention, not a rule) that hxx
signals C++ header files like cxx is sometimes used for C++ sourcefiles.
However, you will see much more cpp or hpp files.
You can pretty much call your files as you want, neither C nor C++ actually
care much, apart from the few special cases that collide with header files
already used by the languages itself.
Uli
Mark said:What is the difference between the extensions *.hxx and just *.h for
header files ? Can they co-exist?
Mark said:What is the difference between the extensions *.hxx and just *.h for header files ?
Can they co-exist?
Aggro said:There is no difference from the point of view of the C++ which
extension you use. Generally .hxx is used for C++ headers and .h is
used for C headers while many use it for C++ headers also.
I've never seen .hxx used in real code. I've seen .hpp on occasion.
James said:It was used with some early MS-DOS compilers, I think. At my
clients, .hh has been by far the most widespread, but all of my
clients have been Unix based.
HiMark said:What is the difference between the extensions *.hxx and just *.h for header files ?
Can they co-exist?
Mark
I have occasionally seen that, when the source files carry a .cc
extension. Symmetry, I suppose.
I'm new in this newsgroup and my english is not perfect too so
be tolerant.
My use of these files is as follow :
- .h files are used to declare types, classes (templates or not),
prototypes (templates or not and so on
- .hxx are used to implement inline methods, templates classes and
functions.
What is the difference between the extensions *.hxx and just *.h for header files ?
Can they co-exist?
James said:Yes. In general, the first decision a company makes is whether
C++ header files will use .h, or something different than C. In
the latter case, the ending for the header files will almost
always be the same as that for the source files, with the c
replaced by an h, e.g. .hpp if the sources are .cpp, .hh if the
sources are .cc, etc. The original convention was .C for C++
sources, and I've also seen .H for the headers. This convention
fails , however, under systems which don't distinguish case, and
it seems like everyone who ported C++ to a system which didn't
distinguish case chose something different. Microsoft (and I
think Borland) chose .cpp, and that has become quasi-universel
in the Windows world. I don't know where the .cc originally
came from (maybe the Glockenspiel ports of CFront), but it seems
the most frequent convention in the Unix world (but not nearly
as ubiquious as .cpp under Windows). At any rate, all modern
compiler drivers understand .cpp, .cxx, .cc and .C if the system
supports it to be C++ sources, so it really doesn't matter that
much (although you should be consistent). (You can also specify
the language explicitly with every compiler I've used; VC++ 6.0
didn't recognize .cc, so when I ported some of my Unix code to
it, I simply specified the source file with /Tp in the command
line. Apparently, I'm not the only one who was porting Unix
code to Microsoft, however, since Microsoft added recognition of
.cc with the next version.)
Nothing, just a naming difference. People sometime use the *.hpp extensionMark Sullivan said:What is the difference between the extensions *.hxx and just *.h for
header files ?
Yes.Can they co-exist?
On 2008-05-19 02:27:17 -0400, James Kanze <[email protected]> said:
Yes, but it was the other way around: Borland started using
.cpp, and when Microsoft got around to C++ three years later,
they followed the established standard.
Does anyone use .c++, as in foo.c++? Would this be seen as
extremely weird/advised against?
Granted there are problems on other platforms, but has anyone
come across any problems with .C on Unix?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.