i was thinking of doing a sorting funciton using templates, but its not working out.
What im trying to sort is one of the following:
- animal type (string)
- animal name (string)
- animal id (int)
- animal owner (string)
i have a linked list of animals. where each animal has all this info.
So if i wanted to print out a sorted list of animal names, i cant seem to do it with using templates.. or can i?
i havnt begun coding, just incase if this is not a good way of doing it..
for templates, i cant send it a variable saying i want to only sort animal id's or animal names.
is there a way around this?