Multiple Header Files
9 August 2007, early morning
When programming, related functionality should be grouped and declared in their own header files, with definitions of functions in their own source files. Dividing your source code neatly in this fashion allows code that requires this functionality to (ideally) #include
just the definitions it needs, and no more. You should be able to look at the #include
directives in source file and header files and understand the dependencies of the code contained within; you should be able to see the relationships between the functions in your program. If you are lazy about the file structure of your source this becomes difficult. Don’t be lazy.
[ed. I think i’ll make this into a bigger post on how to clean up messy projects.]