I'd like to have a macro to call which increments an ID. This ID is a constant, being incremented each time it is called.
Obviously, the following does not work:
#define ID 0 // initially
.. then
#define ID ID+1 // whenever I need a new ID generated.
Is there a trick, potentially with multiple macros to solve this seemingly trivial problem?
thx!
Obviously, the following does not work:
#define ID 0 // initially
.. then
#define ID ID+1 // whenever I need a new ID generated.
Is there a trick, potentially with multiple macros to solve this seemingly trivial problem?
thx!