The __COUNTER__ symbol is provided by VC++ and GCC, and gives an increasing non-negative integral value each time it is used.
__COUNTER__
I\'m interested to learn w
I've never used it for anything but a DEBUG macro. It's convenient to be able to say
#define WAYPOINT \ do { if(dbg) printf("At marker: %d\n", __COUNTER__); } while(0);