I\'m writing a simple macro to show TRACE information.
This is what I\'m using ,
#ifdef __DEBUG__
#define TRACE { PrintErrorMsg(\"Trace exception at
You need this kind of silliness, unfortunately.
#include
#define TRACE2(f,l) printf("I am at file: " f " and line: " #l "\n")
#define TRACE1(f,l) TRACE2(f,l)
#define TRACE() TRACE1(__FILE__, __LINE__)
int main(void)
{
TRACE();
TRACE();
}
I am at file: test.cpp and line: 9
I am at file: test.cpp and line: 10