Originally Posted by arih56 I have a heapsort function which i've used to sort a list of integers. How do I adapt this function to sort a list of strings alphbetically? Instead of comparing integers with '<' and '>', compare strings with strcmp(). If strcmp(a, b) == -1, this means that a < b (lexically). If strcmp(a, b) == 1, this means that a > b, If strcmp(a, b) == 0, this means that a == b.