calling qsort with a pointer to a c++ function
<p>I have found a book that states that if you want to use a function from the C standard library which takes a function pointer as an argument (for example qsort), the function of which you want to pass the function pointer needs to be a C function and therefore declared as extern "C".</p>

<p>e.g. </p>

<pre><code>extern "C" {
  int foo(void const* a, void const* b) {...}
}

... 
qsort(some_array, some_num, some_size, &amp;foo);
</code></pre>

<p>I would not be surprised if this is just wrong information, however - I'm not sure, so: is this correct?</p>
