Parse file and copy words into doubly linked list?

mathews at ecs.umass.edu mathews at ecs.umass.edu
Tue Apr 16 05:30:53 AEST 1991


Could anyone suggest how to parse a text file and place each word in
a doubly linked list:

	typdef struct list
	{
	char word[20];
	struct list *next;
	struct list *prev;
	}LIST, *LISTPTR;

Yes, this is a programming assignment for a class, and I am not looking
for someone to write it for me, just for suggestions.  I have written
a fcn Parse() which places the words in a dynamically created array
using calloc(), but am having problems adapting it for the structure
above.

Any help would be appreciated.  Thanks in advance.

M.J. Mathews
Univ. of Massachusetts at Amherst
mathews at ecs.umass.edu
mathews at umaecs



	typdef struct



More information about the Comp.lang.c mailing list