|
|
You should define these items only once !!!
|
$64,000 question:
|
line 1 line 2 .... line n |
#ifndef KEY #define KEY line 1 line 2 .... line n #endif |
#include "this-header-fiile.h" .... .... #include "this-header-fiile.h" |
Then:
|
/* (1) use conditional include --- the key must be unique !!! */ #ifndef RECURSE_H /* (2) inside the conditional include: define the key !!! */ #define RECURSE_H /* ======================================================== We define RECURSE_H to STOP the processing if this header file is INCLUDED AGAIN !!! ======================================================== */ // This is a recursive include: #include "recurse.h" #define MAX 99999 /* (3) this ends the conitional include from above*/ #endif |
How to run the demo:
|