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.


  Go to C Preprocessor     Go to Index               Go to Using #define (2)