Skip to main content
  • 2701 Accesses

Abstract

The preprocessor is a text substitution tool that modifies the source code before the compilation takes place. This modification is done according to the preprocessor directives that are included in the source files. The directives are easily distinguished from normal programming code in that they all start with a hash sign (#). They must always appear as the first non-whitespace character on a line, and they do not end with a semicolon. The following table shows the preprocessor directives available in C++ along with their functions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Mikael Olsson

About this chapter

Cite this chapter

Olsson, M. (2015). Preprocessor. In: C++ 14 Quick Syntax Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1727-6_24

Download citation

Publish with us

Policies and ethics