Is there a 'built-in' sort
, in which the int (*compar)(const void *, const void*)
does not need to be specified? For example, I find that about 99% of the time I'll do either a basic ascending or descending sort and not care about a special comparison case.
Is there the equivalent of an "in-line" function that can be specified here, or is it always necessary to have a standalone function to do this comparison?