The #define Directive
The #define directive explains a macro which is a text string represented by a name. Whenever the pre-processor finds this name in the program, it is replaced by the text string it shows. The is an following example which explains a value and gives it a name PI.
#define PI 3.14285 // no semicolon given
void main()
{
cout << PI;
}
This program is equivalent to :
void main()
{
cout << 3.14285;
}
The # define directive works strictly on the basis of substitution of a text string for the macro names.