Possible Duplicate:
How to get function's name from function's pointer in C?
I'm printing the configuration for the program to the command line each run, and one thing that I would like printed is the current hash function being used -- which is stored in a function pointer variable.
Is there a way to do something along the lines of:
std::cout << function_pointer.function_name_to_text() << "\n";
So like, if I have a function called sha1(char * pre_image), it would just output sha1
to the console?
the entire method header would be grand too.