templateclass Iterator, class Compare
void sort(Iterator first, Iterator last, Compare cmp);
On Feb 16, 5:57 am, bittu shashank7andr...@gmail.com wrote:
write header file for sorting general element. it can sort any type of
object(int,float,complex number, objects)
Thanks
Shashank
--
You
hope it may work
typedef void (*Swapfunc)(void *element_1, void *element_2);
typedef int (*Cmpfunc)(void *element_1, void *element_2);
void GenericSort(void *array, uint32_t nbElems, Swapfunc swapFunc,
Cmpfunc cmpFunc);
Thanks Regards
Shashank Mani The best way to escape from a problem is
@Bittu: It is interesting that you might want to sort complex numbers,
since they don't form an ordered field. See, e.g.,
http://en.wikipedia.org/wiki/Ordered_field for an explanation why.
Dave
On Feb 16, 5:57 am, bittu shashank7andr...@gmail.com wrote:
write header file for sorting general