I thought about using a function pointer, but then I would either still need the datatype parameter or else do a lot of casting with void pointers (since the compare function will be accepting either...
Type: Posts; User: MK27
I thought about using a function pointer, but then I would either still need the datatype parameter or else do a lot of casting with void pointers (since the compare function will be accepting either...
If I want to write a sort function for a linked list that can use external functions for selecting between criteria (depending on whether the criteria is alpahabetic or numeric), what's the best way...