fb <me@no.net> wrote in <n1********************@news1.calgary.shaw.ca>:
<SNIP>
... Would it be possible to put all my prototypes and definitions into
one header file? I suppose that would be bad form though...right?
It's of course possible, and for a small projects probably the best
way - you don't want to end up with one header file per prototype or
so, do you? For larger projects there is a "rule" to have one header
file per module, and maybe one header file to gather all the #include
directives you need for your main (or even another) module. This way
it's even more easy to reuse a module in other projects, without
having to find out which parts of your header file you really need -
it's already well sorted.
However, for small projects, or if you are a beginner, it's better to
have all your prototypes and declarations in one place - this way you
won't get confused about where to look for, say, a specific function
prototype and you can concentrate on your task.
OTOH, if your single header file grows to big, you should divide it
in logical units and put these in separate files - even in small
projects you may end up with sth. like 'proto.h' and 'def.h', or the
like.
Anyway, it's up to you to modularize [is this english or germish?]
your project to your own preferences and needs. It is definetly worth
thinking about /before/ you actually start writing code.
After all, there is no one-for-all rule for this.
Irrwahn
--
Rain is just liquid sunshine.