C - add element to sorted-linked-list (alphabetical sorting)
问题 I have to do some kind of work here. My task is to write words from file to a struct in alphabetical order. I thought "hmmmm.. that's easy", but not - it isn't. Or just I f*cked it up :( Can you guys tell me how should I alphabetically add words to my list using these 3 functions? Or maybe it is other way to do this? I share most of my code. struct Word { char* word; struct Word* pNext; }; typedef struct Word Word; bool IsLegitWord(char* word){ int word_length = strlen(word); int i = 0; for(i