Visual C++ equivalent of __FILE__ , __LINE__ and __PRETTY_FUNCTION__
19:52 13 Dec 2010

GCC compiler gives me the following macros:

  • __FILE__ so that I can print out the file name + directory.
  • __LINE__ so that I can print out the line number of where I'm printing from.
  • __PRETTY_FUNCTION__ so that I can print out the pretty function name

Does Visual C++ have the equivalent of these macros? A side question is, are these standard for C++ compilers?

c++ gcc visual-c++