GCC compiler gives me the following macros:
__FILE__
so that I can print out the file name + directory.__LINE__
so that I c
__FILE__
and __LINE__
are standard since C89. __PRETTY_FUNCTION__
is a GCCism. __func__
is a C99ism which (unlike GCCisms) may well be available in Visual C++; it is not precisely the same as __PRETTY_FUNCTION__
but it may be close enough for your purposes.
Yes Visual C++ has them or an equivalent. See the responses here:
What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__? function-func/4384860#4384860
Also note that despite the upper case used, they aren't macros. They're variables.