Re: Passing Glists to callbacks



On Monday 05 December 2005 21:20, you wrote:
Adam wrote:
Hi all,

[...]

Any suggestions are of value.

Hi,
     Its hard to make out what exactly it is your doing...
it would be helpfull if you posted a short example
of code that doesn't work.

A common mistake when passing lists in as arguments to
a callback *that modifies the list* is when people pass
in the head node itself instead of its address, since
you almost always want to re-assign the head node after
any list operations.


I've resolved the issue I was taking the pointer to the first element of the 
list when I was traversing the list. In the sample code it should be tmp 
instead of instruments in the inner for loop.

Thanks 

Adam



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