Basic Usage
The most often used of directives are:-
- #define
- #if
- #endif
The directive # define to define a preprocessor variable, this is pretty useless by itself but is used in connection with the case #if and # endif allows you to compile code depending on whether a variable is defined. Gray with Visual Studio that will not compile.
Example 1
Notice the grey line of code on line 14; this will not be executed as it is not compiled


0 comments:
Post a Comment