Chapter 8. Using the C Preprocessor

As your applications grow in complexity, they become harder and more time consuming to manage, program, and edit. Furthermore, as you begin using modular coding methods, such as defining your own functions and working with multiple files, you need easier ways to manage and use all that code. This is where the C preprocessor—an essential tool developed to assist the C programmer—comes in.

This chapter begins by discussing the basic syntax for using the preprocessor and how it relates to C. We'll then show you a common, practical example for using the C preprocessor to define array sizes. You can also create pseudo-functions using the C preprocessor, and you'll learn how, both with and without arguments. Finally, we provide a recap on including header files—which is technically a C preprocessor event—and cover the syntax for writing conditionals for the C preprocessor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset