Own Header Files
((Sorry, if smth like this was posted, but I didn't find anything with search-sorry and for bad English))
Plz don't think I'm a total noob, because I asked this questions:
I created my own header file which includes my functions for a new game. I saved it in a "include" file of C++(where are the iostream, stdlib etc.). Now my problem is that I don't know how to use it if it's not in that file. This really a problem for me, but if I'd create a lots of .h/.hpp files, thre will be a total mess;) .
Which is better for C++: .h or .hpp files?
It is normal to create dozens of header files for a big project.
If you do not wish to copy your header files to a new project directory each time you start a new project, just put them in your compiler's default include directory.
Whether .h or .hpp is used is often decided by which compiler you're using. I use .h.
> just put them in your compiler's default include directory.
No, don't do that - not unless you like losing all your work when you upgrade / patch / change your compiler.
Create separate 'myinc' and 'mylib' directories for all the useful stuff you create and want to re-use from project to project.