ifndef : ifndef « Preprocessor « C Tutorial






#ifndef is used to check whether a particular symbol is defined.

#define USA 1
//#define EUP 1

#include <stdio.h>

#ifndef USA            
   #define currency_rate 100    
#endif               

#ifndef EUP                 
   #define currency_rate 46
#endif               
main()
{
    int rs;
    rs = 10 * currency_rate; 
    printf ("%d\n", rs);
}
460








12.8.ifndef
12.8.1.ifndef