to make a C header file so that it can be #include'd more than once but will only be #include'd once, do something like this
foobar.h:
Code:
#ifndef FOOBAR_HEADER_FILE
#define FOOBAR_HEADER_FILE
// put your header code here, then right before the end of file:
#endif
why? because header files sometimes include other header files, for various reasons, and especially when you get into a large many filed program, this method stops "circular dependancies" from occurning where
foo.h includes bar.h
bar.h includes kensmom.h
kensmom.h includes foo.h
with this (very standard btw) method,
foo.h includes bar.h
bar.h includes kensmom.h
kensmom.h says to include foo.h, but the preprocessor looks and see's that foo.h has already been included, so it doesnt include it again.