please help..linked list homework assignment due tomorrow..
hey im trying to read a sequence of strings from the user and store them in different nodes..my code reads the line and stores it as a whole sentence , how do i split the line into individual strings and store them into different nodes ? if i use strtok it only stores the first word and ignores the rest..please help!
p=(Node *) malloc(sizeof(Node));
p->next = head;
head = p;
char *getline( char *text)
if( fgets( word, 128, stdin ) == NULL ) return NULL;
if( ( temp = strchr( words, '\n' ) ) )
*temp = 0;
else while( getchar() != '\n' );