The __COUNTER__ Macro

Syntax

The macro is __COUNTER__ only, with no argument list.

Expansion

The __COUNTER__ macro expands to the text for an unsigned integer constant in decimal notation. The value of the integer increases by 1 on each expansion.