When using the #if directive to conditionally compile code if a particular symbol is defined, you can also using #else to conditionally compile code if the symbol is not defined.
Here’s an example:
1
2
3
4
5
| #if LOGGING DoLotsOfLogging(); // To assist in debugging #else DoMinimalLogging(); #endif |