Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 1.12 KB

directives-to-the-preprocessor.md

File metadata and controls

32 lines (28 loc) · 1.12 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs ms.assetid caps.latest.revision author ms.author manager
Directives to the Preprocessor | Microsoft Docs
11/04/2016
cpp-language
article
C++
adc6251e-cf6b-4508-bdbb-55f446c838d3
7
mikeblome
mblome
ghogen

Directives to the Preprocessor

A "directive" instructs the C preprocessor to perform a specific action on the text of the program before compilation. Preprocessor directives are fully described in the Preprocessor Reference. This example uses the preprocessor directive #define:

#define MAX 100  

This statement tells the compiler to replace each occurrence of MAX by 100 before compilation. The C compiler preprocessor directives are:

#define #endif #ifdef #line
#elif #error #ifndef #pragma
#else #if #include #undef

See Also

Source Files and Source Programs