i'm trying to read a text file into a linked list storing each word in a different node in the list.
i don't know how to tell it to stop reading when it gets to the end of the word (a space, newline or punctuation mark).
this is the code i have so far:
thanks a lot any help will be greatly appreciated
/* opening and reading from a file */
text = fopen("filename", "r");
/* here i need to tell it to stop reading when it gets to the end of the word */
n = fread(c, 1, 50, text);