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.
Tue Jan 17 11:40:37 GMT 1995