CHAPTER 17

image

The Preprocessor

Power tends to corrupt; absolute power corrupts absolutely.

—Lord Acton

The preprocessor in C was historically a separate program that was able to affect code compilation based on the value of flags defined at compile time. Over time, the preprocessor was extended and integrated into the C++ compiler. The designers of C# chose to adopt a subset of the C++ preprocessor, retaining only the conditional compilation commands and rejecting the macro substitution language in order to keep C# code simple.

Preprocessor directives all begin with the # symbol. Modern compilers increase throughput by integrating the preprocessor ...

Get C++ 2013 for C# Developers,Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.