Page t036, go to NEXT,
PREVIOUS, INDEX
Header Files
In a large program, it is possible that a header file might get included
twice
Use the C preprocessor to avoid double inclusion
#ifndef COULOMBSLAW_H
#define COULOMBSLAW_H
extern double CoulombsLaw (double q1, double q2, double r);
#endif /* COULOMBSLAW_H */
- #ifndef is preprocessor directive saying
"if not defined"
- COULOMBSLAW_H is preprocessor macro variable
and is upper case by convention
- #define defines a macro variable, but in this case
doesn't give it a value
- #endif ends the #ifndef
- this structure seen in all system header files
C Course, 21-jan-1997,
Peter Klok,
pfk@hef.kun.nl