Defining symbols in C and C++

The #define symbol is a constant and macro that the preprocessor expands before compilation. No storage is allocated for these symbols. They have no type, and the debugger cannot reference them.

About this task

This definition has the same effect as the following preprocessing switch:


   /D<name>{=|#}<text>
  • Solving parser problems with unknown macros or statements
  • For #ifdef inclusion or exclusion of code parts

To define symbols:

Procedure

  1. In the Set pre-processor options window, click New icon.
  2. In the new row, select the type of the entry from the options and add the value.
  3. Click Finish if you are done adding the type and values.