DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   hpp? (http://www.daniweb.com/forums/thread158870.html)

CoolGamer48 Nov 21st, 2008 9:10 pm
hpp?
 
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?

seanhunt Nov 21st, 2008 9:31 pm
Re: hpp?
 
It's a bit unusual, but is one of the extensions usable for C++ header files.

Rashakil Fol Nov 21st, 2008 10:17 pm
Re: hpp?
 
It seems that the boost libraries use .hpp.

Alex Edwards Nov 22nd, 2008 12:43 am
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

ArkM Nov 22nd, 2008 1:42 am
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


All times are GMT -4. The time now is 4:57 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC