Quote:
Originally Posted by Damien1247
#define is a preprocessor command, the scope is through whatever file(s) you include it in. Least that is how it works if you have them in .h files. If your #define is in a .c file it is global to the file. Hope this helps.
|
The only thing I would add to this is that it is only global after the line on which it is defined. I suppose this is the same as any other global variable, except global variables have to be defined at the top of the file, or the top of the function. #defines can be used anywhere.