Original Post
I am trying to make my 3D engine as modular as possible, but I am having problems including header files correctly. I have a file called basics.h which contains classes like CVertex, CColour, and CVertex, and the implementation is in basics.cpp. I the have files called world.h and world.cpp which have classes like CWall, CSector and so on, and these types contain some of those defined in basics.h.
This means both world.h and world.cpp need acsess to basics.h. Should it be included in both files? Is it OK to include headers from other headers?
what if I now have my main program in main.cpp and main.h. Do i need to include world.h in both? (main.h may have references to the classes in function prototypes) Do I also need to include basics.h or is it automatilly included via world.h/world.cpp?
You get the idea, what should be in header files and how should they all link together?? Please help