#define preprocessor

The #define preprocessor allows us to define symbolic names and constants. A quick example

	#define PI 3.14159
This statement will translate every occurance of PI in the program to 3.14159. Here is a more complete example:

	#define PI 3.14159
   	   int r=10;
	   float cir;
	   cir = PI * (r*r);
This feature is partically usefull for defining 'magic' numbers.

See Also:


example program.

Conflict between enum and #define.

Top Master Index Keywords Functions

Martin Leslie