[algogeeks] Re: General Sorting Header File Adobe

2011-02-16 Thread Don
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

[algogeeks] Re: General Sorting Header File Adobe

2011-02-16 Thread bittu
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

[algogeeks] Re: General Sorting Header File Adobe

2011-02-16 Thread Dave
@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