Assume this code example:
-
#define MAX_STRING_LEN 100
-
-
char string[ MAX_STRING_LEN ];
-
We define MAX_STRING_LEN to be 100. This means that whenever the
text MAX_STRING_LEN is found it is replaced by 100. So, after the preprocessor step, the above code now becomes:
Now let's take a macro that takes an integer and increments it:
-
#define INT_INCR( integer ) ( ( integer )++ )
-
-
int x = 0;
-
INT_INCR( x );
-
After the preprocessor step the above code becomes:
Hope that helps. Show us what you have done so far.