Linked List Question - Help
From: TJ (TJ_at_nospam.com)
Date: 10/28/04
- Next message: Kevin Anthoney: "Re: Linked List Question - Help"
- Previous message: Larry Barowski: "Re: conio.h kbhit() and getch()"
- Next in thread: Kevin Anthoney: "Re: Linked List Question - Help"
- Reply: Kevin Anthoney: "Re: Linked List Question - Help"
- Reply: Conrad S.: "Re: Linked List Question - Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Oct 2004 15:50:36 -0400
Hi,
I have a function that returns a pointer of the Header of the list.
Upon each call of the function, a new node is added into the list,
returning the header of the list back.
I can succesfully use the following syntax :
struct Node *Phonebook;
Phonebook = create(Phonebook, 3,9);
Phonebook = create(Phonebook, 5,15);
The function create adds the entries 3 and 9 as the data for
the 1str node and 5, 15 for the second node. When i call print
function, it prints me out all nodes in the list.
How do i use an array to keep track of the lists? If i try
struct Node *Array[17];
Array[0] = create(Phonebook, 3, 9);
Array[0] = create(Phonebook, 5,15);
When i run the print function, it prints 5 15 only.
Will appreciate some help!
Thanks,
Ali
- Next message: Kevin Anthoney: "Re: Linked List Question - Help"
- Previous message: Larry Barowski: "Re: conio.h kbhit() and getch()"
- Next in thread: Kevin Anthoney: "Re: Linked List Question - Help"
- Reply: Kevin Anthoney: "Re: Linked List Question - Help"
- Reply: Conrad S.: "Re: Linked List Question - Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|