View Single Post
Old Oct 28th, 2005, 7:42 PM   #7
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 885
Rep Power: 4 The Dark is on a distinguished road
One thing to start with is that you have to decide how you are going to access your linked list within your functions. The
void addIntoLinkList(char tempCity, double x, double y)
function needs to have a linked list to work with. You can either make your linked list pointer global, or you can pass it in to the function. The second option is better as it means latter on you can have more than one linked list if you need it. Something like
void addIntoLinkList(cityNode *pLinkedList, char tempCity, double x, double y)
I called the variable "pLinkedList" to indicate that it is a pointer to the linked list.
Note that the linked list would have to be passed in from your getFiles function, so it needs to have the linked list as a parameter too, so it can pass it on.
The Dark is offline   Reply With Quote