Does C have __func__ functionality for names of the arguments of a function?
问题 Does the "C" standard support something similar to __func__ for the function arguments' names? 回答1: if you want a quick and dirty solution for this make pre-processor macros like this... #define FUNCTION_HEADER(a) a { const char* __func__ = #a; #define FUNCTION_FOOTER() } ... and use it for your function headers and footers like this (tested with VS 2008): #include <windows.h> #define FUNCTION_HEADER(a) a { const char* __func__ = #a; #define FUNCTION_FOOTER() } FUNCTION_HEADER( int WINAPI