这些是功能
//printList for Debugging
void printList(letterListT *head){
letterListT *temp = head;
while(temp != NULL){
printf("%c ", temp->letter);
temp = temp->nxt;
}
}
//Add the Specified Letter by Creating a New Node in the Letter List defined
void addLetter(letterListT *letListHead, char letter){
letterListT *newNode;
newNode = (letterListT *)malloc(sizeof(letterListT));
newNode->letter = letter;
newNode->nxt = letListHead->nxt;
letListHead->nxt = newNode;
}
这些主要是:
unusedLetList = (letterListT *)malloc(sizeof(letterListT));
unusedLetList->nxt = NULL;
for(i=122; i>=97; i--){ //ascii codes for z to a
addLetter(unusedLetList, i);
}
//printlists Test
printList(unusedLetList);
这是输出...
p a b c d e f g h i j k l m n o p q r s t u v w x y z
我的问题是……这个“p”是从哪里来的?!