AllBestEssays.com - All Best Essays, Term Papers and Book Report
Search

Preprocessor Directives

Essay by   •  January 20, 2012  •  Essay  •  329 Words (2 Pages)  •  1,352 Views

Essay Preview: Preprocessor Directives

Report this essay
Page 1 of 2

My Training Period: hours

Abilities

▪ Able to understand and use #include.

▪ Able to understand and use #define.

▪ Able to understand and use macros and inline functions.

▪ Able to understand and use the conditional compilation - #if, #endif, #ifdef, #else,

#ifndef and #undef.

▪ Able to understand and use #error, #pragma, # and ## operators and #line.

▪ Able to display error messages during conditional compilation.

▪ Able to understand and use assertions.

10.1 Introduction

- For C/C++ preprocessor, preprocessing occurs before a program is compiled. A complete process

involved during the preprocessing, compiling and linking can be read in Module W.

- Some possible actions are:

▪ Inclusion of other files in the file being compiled.

▪ Definition of symbolic constants and macros.

▪ Conditional compilation of program code or code segment.

▪ Conditional execution of preprocessor directives.

- All preprocessor directives begin with #, and only white space characters may appear before a

preprocessor directive on a line.

10.2 The #include Preprocessor Directive

- The #include directive causes copy of a specified file to be included in place of the directive. The

two forms of the #include directive are:

...

...

Download as:   txt (1.4 Kb)   pdf (41.9 Kb)   docx (9 Kb)  
Continue for 1 more page »
Only available on AllBestEssays.com