Next: Using #define to Up: The C Preprocessor Previous: The C Preprocessor

Using #define to Implement Constants

We have already met this facility, in its simplest form it allows us to define textual substitutions as follows.


  #define MAXSIZE 256
This will lead to the value 256 being substituted for each occurrence of the word MAXSIZE in the file.


January 1995