Use the following defines (for example in stdafx.h):
#define __STR2__(x) #x
#define __STR1__(x) __STR2__(x)
#define __LOC__ __FILE__ "("__STR1__(__LINE__)") : "
Then use __LOC__ in your #pragma message() statements:
#pragma message(__LOC__"This code will be completed in Phase 2")
At which point you should see the following compiler output:
C:\honda\2.5g\PC\runtime\SILinkProcess\SiLink_helpers.cpp(567) : This code will be completed in Phase 2
Very handy!
No comments:
Post a Comment