Re: [gtk-list] gpointer help needed




On Mon, 19 Apr 1999, Scott A. Barron wrote:
>         /* This fails to compile */
>         (struct _my_structure *)data->member;

this syntax casts the variable "member" and not the variable "data"
what you want is:

((struct _my_structure *) data)->member;

to cast the variable "data" and then reference the member.

hope this helps,
-chris

_______________________________________________________
Christopher Rogers      Stevens Institute of Technology
gandalf@pobox.com       http://www.pobox.com/~gandalf

An optimist believes we live in the best of all possible worlds.  
A pessimist is sure of it!




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