943,758 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 685
  • C++ RSS
Nov 21st, 2008
0

hpp?

Expand Post »
Does anyone actually use the .hpp file extension for C++ header files? I've never seen it used, but I was just working with geany, and I noticed that it only syntax highlights C++ specific things if the file extension is .hpp (or .cpp, obviously, but not .h).

So what's the deal with that?
Similar Threads
Reputation Points: 77
Solved Threads: 40
Posting Pro in Training
CoolGamer48 is offline Offline
401 posts
since Jan 2008
Nov 21st, 2008
0

Re: hpp?

It's a bit unusual, but is one of the extensions usable for C++ header files.
Reputation Points: 13
Solved Threads: 6
Light Poster
seanhunt is offline Offline
40 posts
since Oct 2008
Nov 21st, 2008
1

Re: hpp?

It seems that the boost libraries use .hpp.
Team Colleague
Reputation Points: 1135
Solved Threads: 171
Super Senior Demiposter
Rashakil Fol is offline Offline
2,478 posts
since Jun 2005
Nov 22nd, 2008
0

Re: hpp?

From what I understand, as long as a file has C++ syntax in it, it can be used as part of a C++ project ( if its a resource file its a different story I suppose, since I haven't really messed around with those @_@).

For example, the iostream header files, etc have no extensions. They're just 'raw files' with C++ syntax in them. You could probably get away with making up a fake extension that the computer doesn't recognize as a part of any program and still be able to use it in a C++ program so long as you're including it.

This is an assumption though, given the way headers are linked during compile time (its like adding the data from different files into one single file to be executed - so really I don't see why the extension matters @_@ )

-Alex
Reputation Points: 392
Solved Threads: 108
Posting Shark
Alex Edwards is offline Offline
971 posts
since Jun 2008
Nov 22nd, 2008
0

Re: hpp?

Look at an interesting discussion about C++ file extensions:
http://stackoverflow.com/questions/1...ss-definitions
There are others C++ header file extensions in use: .hh, .hxx et al
Reputation Points: 1234
Solved Threads: 347
Postaholic
ArkM is offline Offline
2,001 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: c++ program to find the product of two array of integers-clear errors?
Next Thread in C++ Forum Timeline: Using 2D Arrays inside Classes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC