C++: How do you convert the name of a function pointer to text?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/351134/how-to-get-functions-name-from-functions-pointer-in-c">How to get function&#39;s name from function&#39;s pointer in C?</a>  </p>
</blockquote>



<p>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.</p>

<p>Is there a way to do something along the lines of:<br>
<code>std::cout &lt;&lt; function_pointer.function_name_to_text() &lt;&lt; "\n";</code></p>

<p>So like, if I have a function called sha1(char * pre_image), it would just output <code>sha1</code> to the console?
the entire method header would be grand too.</p>
