The Extract Define refactoring ( &shortcut:CIDR.Lang.IntroduceDefine; or Refactor | Extract | Define) helps you simplify complicated statements by defining the selected expression as macro using the #define directive. The resulting macro can be placed in the same file or in the associated header.

For example, in the code fragment below, you could select an expression in the code

Extract define

and press &shortcut:CIDR.Lang.IntroduceDefine; (Refactor | Extract Define).

This will result in the following:

Extracted define