x

C++ Preprocessor Directive

PREV     NEXT

What are Preprocessor Directives?

  • The preprocessor directives are the lines that are included in a program which begins with the # and it is different from the typical source code.
  • They are invoked by the compiler to process the programs before compilation. The preprocessor directive is placed at the top of the source code in a separate line beginning with the character # and followed by a directive name.
  • The preprocessor directive statement cannot be with semi colon. Some of the examples of preprocessor directives are #define, #include, #indef, etc.

Types of Preprocessor Directives