Re: garray beginner problem

2005-05-28 Thread Freddie Unpenstein
> > garray = g_array_new (FALSE, FALSE, sizeof (Machine)); > > for (i = 1; i < 1; i++){ > > Machine *newMach = machine_new(i,"trd11","d11","joe"); > > g_array_append_val (garray, newMach); > Two problems here: You pass a *pointer* to Machine, not > a Machine, so a pointer is stored into garra

Re: garray beginner problem

2005-05-27 Thread David Necas (Yeti)
On Fri, May 27, 2005 at 11:50:44PM -0400, Kim Adil wrote: > I am trying to figure out how to use GArray containers. This gives me > rubbish in the printf output. I think it relates to how I am accessing > the data nce it is in the array rather than what is stored in the array. > Any comments and

garray beginner problem

2005-05-27 Thread Kim Adil
I am trying to figure out how to use GArray containers. This gives me rubbish in the printf output. I think it relates to how I am accessing the data nce it is in the array rather than what is stored in the array. Any comments and ideas would be appreciated. GArray *garray; garray = g_arra