I have a list whose structure is the following:
and I need to order the elements of the list alpabetically I've produced the following code but it seem not to work... the idea is to use two pointer and two while cycles so that I compare the first element of the list pointed by the first pointer while I scroll from the second to the last element of the list in serch of a smaller element; when I find it I simply exchange the two strings using a temporary string; when the second pointer reaches the end of the list I repeat this process starting from the second element and so on...
typedef struct dats_s
struct data_s *next;
this is the code involved in the sorting process:
any suggestion is welcome!!