Visual C++ equivalent of __FILE__ , __LINE__ and __PRETTY_FUNCTION__

后端 未结 8 2267
后悔当初
后悔当初 2020-12-14 08:50

GCC compiler gives me the following macros:

  • __FILE__ so that I can print out the file name + directory.
  • __LINE__ so that I c
8条回答
  •  孤城傲影
    2020-12-14 09:19

    __FILE__ and __LINE__ are standard, and I'm rather certain Microsoft compilers have essentially always had them.

    __PRETTY_FUNCTION__ is a gcc feature.

提交回复
热议问题