Linked list question

G'Day !

Sorry if this does not directly related to GTK+, but I am using GLIB linked
lists ;-)

My problem is that I have two linked lists, with a one-to-many
relationship.  So I am using pointers to relate items in the first list to
those in the second.

My problem is that when it comes to use the data, I can get the address
(lvalue) of the correct struct in the second list, I do not know how to get
the rvalues ot the struct members.

I have looked at all my reference books and have asked around, but nobody
knows the correct syntax to do this.  Seems to me once you get the rvalue
it just simple pointer arthimatic to get all the values in the struct.

BTW I have a search function I could use, but then why bother with

Any hints on doing this ?

Another question that needs to be asked.  If I delete an item from a linked
list, does the address change for the members or is it just the pointers
reference the next member.


Jim Parker

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]