O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Pre-Processor Concept

If you think back to the first chapter, recall that the purpose of the compiler is to turn a C program into object code, ready for linking with other pieces of object code to form the final application. The C pre-processor is invoked before the compilation phase but is transparent to the user or programmer.

The C pre-processor exists for several reasons. First, it allows the programmer to reference (include) external files that are needed in order for the compiler to be able to produce the object code.

Second, the C pre-processor allows the language to be expanded in a user-defined fashion by the use of macros. A macro is just a set of instructions referred to by a single name. Each macro can be defined and then inserted ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required