How to get the function name while in a function for debug strings?

前端 未结 5 1481
故里飘歌
故里飘歌 2021-02-01 20:35

I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-01 21:08

    "__FUNCTION__" is supported by both MSVC and GCC and should give you the information you need.

提交回复
热议问题