Tag: 按字母顺序排列

在C中添加节点字母

你可以返回addWord部分,它将按字母顺序添加单词吗?我试过但它没有用。我是C编程的新手。实际上,我正在研究它一周但我不能解决问题。 typedef struct NODE { char *str; int count; struct NODE *pNext; } NODE; void addWord(char *word) { NODE *pCounter = NULL; NODE *pLast = NULL; if(pStart == NULL) // pstart is globally defined pStart=NULL; { pStart = createWordCounter(word); return; } /* If the word is in the list, increment its count */ pCounter = […]