Read word from file into simple linked list
问题 I need to write a program to read from a file, then save the words into a linked list for further use. I decided to read the text character by character using fgetc, then save all into the list each time a newline ( '\n' ) or space ( ' ' ) is detected, indicating one word. Sorry I'm a newbie in file pointers, this is what I've gotten so far: struct list { //global char string[30]; struct list *next; }; int main(void) { FILE *filePtr; char file[] = "text.txt"; char tempStr[30]; list *curr,