C and C++ Programming Resources | C & C++ Code Example Index

 

 

 

 

The C++ Preprocessor Directives Sample Codes Index Page

 

The following links demonstrate the preprocessor directives typically used in C++ programs which are shared with C programs.

 

 

C++ Preprocessor Directives Code Samples

  1. Using the assert() to test whether x < y C++ example

  2. Using the standard pre-defined and compiler specific macros C++ code sample

  3. Checking the header file multiple inclusion or re-definition C++ program example

  4. Using the #define, #ifdef, #ifndef, #undef, #else and #endif in C++ program example

  5. The #define directives for simple mathematical operations C++ code example

  6. Creating the custom made C/C++ header file in C++ programming which is reusable

 

C and C++ Programming Resources | C & C++ Code Example Index | C Code Example Index