How do I define a macro to get a string representing the __LINE__?
This comes from an internal Distribution List, I thought this might be useful:
#define STRINGIFY(a) #a
#define LINESTR STRINGIFY(__LINE__)
printf("this is line %s\n", LINESTR);
Outputs “this is line __LINE__”
#define STRINGIFY(a) #a
#define STRINGIFY2(a) STRINGIFY(a)
#define LINESTR STRINGIFY2(__LINE__)
printf("this is line %s\n", LINESTR);
Outputs “this is line 364”