hi!
i'm trying to read into a dynamic array of linked lists.
where the info is:
0: a1 a2 a3
1: b a1 a2 a3
2: l1 l2 l16
i want to put 0:, 1:, 2: into a dynamic array.
and i want to put a1, a2, a3 and b etc into a linked list.
i havent any problem with doing the linked list part...
but how do i create the dynamic array with the linked list?Code:list_t *list; int i = 0; int a=0; int MAXNO=10; list = make_empty_list() while(scanf("%d", &i)==1){ for(a=0; a<MAXNO; a++){ list= insert_at_head (list, i); } }
which gets created first?
how does it allocate?
does this mean i need a buffer and i need to read in a line at a time?
Thanks for your help



LinkBack URL
About LinkBacks


