I am trying to understand the difference between a typedef and define. There are a lot of good posts specially at this previous question on SO, however I can\'t understand the p
It means that the preprocessor runs before the compiler and it modifies the source code before passing it on to the compiler. Thus, the compiler never sees some of the code. Example:
#define ONE 1
int x = ONE;
When you compile this, the preprocessor changes it into this:
int x = 1;
and passes that new text to the compiler. Thus, the compiler does not see the text ONE
.