> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of David McKen
> Sent: Tuesday, April 09, 2002 6:43 AM
> To: dev...@li...
> Subject: [Dev-C++] What is the scope of preprocessor directives???
>
>
> What is the scope of a preprocessor directive?
The scope of the rest of its file and the files in which its file is
included. Or till one other directive that cancels it.
>
> For example if I put a #define what statements are affected by it?
>
> Also if I have a *.h file that has a set of #defines in it will they
> affect other files in the project or am I restricted to the command
> line for that
Yes they can if you #include the file in other files. But you must try
hardly to not happen that. So use large & ugly names for macros and if
possible #undef them at the end of their use.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|