I was like trying to create a program,to edit and modify text .
So I created 2 linked lists, one for the characters and one for the lines.
the program i created was :
but it doesn't work.Can some one help as to how to go on add the 2nd character and how to manually assign it some some letter.Code:#include <stdio.h> typedef struct node{ char cHar; struct node *next; }character; typedef struct sentence{ character word; struct sentence *next; }line; int main(void){ character *d; line *e; e->word.cHar='d'; e->word=e->word.next; e->word.cHar='a'; e->word=e->word.next; e->word.cHar='v'; e->word=e->word.next; e->word.cHar='i'; e->word=e->word.next; e->word.cHar='d'; }
And also how to allocate some memory space for the new letter.
All replies posted to this thread is much appreciated.
Thanks Alot