Re: [cc65] Linked List Problem

Date view Thread view Subject view

From: Johan Kotlinski (johan_at_littlesounddj.com)
Date: 2003-12-31 20:21:55


Hi Payton!

> I'm writing a linked list library for myself and am
> having problem retrieving the strings from the nodes. 

What you have to do is to use call by reference instead of call by value for some of your functions.

NewList and NewNode should be defined like this:

LIST_RESULT NewList (PStringList *p_List);
LIST_RESULT NewNode (STRING p_strKey,  STRING p_strValue,   PStringNode *p_NewNode);

...and updated inside the function with *p_List = NewList;

There are other small problems with your code, but I'm sure you can iron them out.

Happy new year,
Johan
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-12-31 20:22:16 CET