*.hpp files

T

T. F.

A short question:

What exactly are *.hpp files? I mean how are they different from other
header files?
 
R

red floyd

T. F. said:
A short question:

What exactly are *.hpp files? I mean how are they different from other
header files?

They're some peoples' way of indicating that a header file is for C++ (much
as some people use .cpp for C++ source).
 
T

tom_usenet

A short question:

What exactly are *.hpp files? I mean how are they different from other
header files?

There is no fixed extension for header files. You can use .h, .hpp,
H, .hxx, or whatever you fancy (".C++ header", say) that your
platform can handle. Standard headers have no extension, and the
standard C headers have .h extensions, but apart from that it's up to
you.

Tom
 
G

Gianni Mariani

tom_usenet said:
There is no fixed extension for header files. You can use .h, .hpp,
H, .hxx, or whatever you fancy (".C++ header", say) that your
platform can handle. Standard headers have no extension, and the
standard C headers have .h extensions, but apart from that it's up to
you.

Suggestion:

Unless you really really need to, I suggest that you don't invent new
suffixes for header files. This is not exactly somthing that needs any
creativity. Besides, some tools, (like ones I have written) attempt to
identify headers by the file suffix and would need tweaking to work for
new suffixes.
 
J

Jeremy Cowles

creativity. Besides, some tools, (like ones I have written) attempt to
identify headers by the file suffix and would need tweaking to work for
new suffixes.

That's a flaw in your app, you are using rules that don't really exist. Your
app should take into account that header files can be of any extention (or
lack thereof) or name.
 
J

Jeremy Cowles

creativity. Besides, some tools, (like ones I have written) attempt to
So, if you want to invent new suffixes, go right ahead, just expect to
be wading through a whole bunch of tools trying to figure out how to
configure them to accept new suffixes.

This is a *standard* programmer response, "it's not my apps fault, it's the
users fault", well that's not how it works, if you don't implement something
based on previously established rules, it means that your program is flawed,
not the user who is just following the rules.

Just think if the developer of your compiler just said, hey, the "New"
keyword is stupid, if you use it, thats your fault, not my compiler, and
never documented this fact.

Good software has no room for laziness and inflated egos.
 
T

Thomas Matthews

T. F. said:
A short question:

What exactly are *.hpp files? I mean how are they different from other
header files?

I use the ".hpp" extension for C++ header files, ".cpp" for sources.
I use ".h" for C language files and ".c" for sources.
The Borland Compiler wishes everybody would use ".h" for header files.

Header files can have any filename, that is valid with your operating
system. The ".hpp" is just a common convention.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
J

Jeremy Cowles

I know that last post was mildly inflamitory, sorry about that. I just have
strong feelings when it comes to this type of thing.
 
J

jeffc

Gianni Mariani said:
Unless you really really need to, I suggest that you don't invent new
suffixes for header files. This is not exactly somthing that needs any
creativity.

I thought you like to think outside the box? I thought you used whatever
means necessary to solve the problem at hand? Now you are conforming?
 
L

llewelly

jeffc said:
I thought you like to think outside the box? I thought you used whatever
means necessary to solve the problem at hand? Now you are
conforming?

Yes. Thinking out of the box is good for you. I pull some bits out of
/dev/random to use as a header file extension. It is hard to
remember the suffixes of some of my headers, but I am sure the
habit keeps me on my toes and improves my mental agilty. It is the
thinking man's equivalent to laying on the ground and rolling to
work, as opposed to driving or taking the subway.
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top