Turns out that my simplearray2.c did work! But when I printed out the
arrays, I forget to make the subscript so that it referenced the different
arrays, but instead just one!
See correction below
Now that recall you can pass an array directly, I won't be using this
function prototype to pass argu
I was making it more complicated than necessary. Pointers always screw
me up! This works!
#include
#define NUM_ARYS 5
void load_arrays( GArray *garrays[NUM_ARYS] )
{
gint i,j, storevalue;
// put the load arrays stuff here.
for (j=0; j < NUM_ARYS; j++) {
garrays[j] = g_array_new (FALSE
On Sat, Feb 27, 2010 at 10:06:46PM -0500, Tristan Van Berkom wrote:
> On Sat, Feb 27, 2010 at 9:50 PM, Brian Lavender wrote:
> > I guess the list stripped the attachments. The code is included in this
> > message.
> >
>
> Hi,
> First of all it would be helpful if you told us what is the probl
that updates the values of ptrarray->pdata[i] = garray->data
> and have a real indexable array in C...).
>
> Cheers,
> -Tristan
>
> > brian
> >
> > On Sat, Feb 27, 2010 at 06:47:30PM -0800, Brian Lavender wrote:
> >> I was experimenting wit
values of ptrarray->pdata[i] = garray->data
and have a real indexable array in C...).
Cheers,
-Tristan
> brian
>
> On Sat, Feb 27, 2010 at 06:47:30PM -0800, Brian Lavender wrote:
>> I was experimenting with creating an array of arrays. Maybe I shouldn't
>&
I guess the list stripped the attachments. The code is included in this
message.
brian
On Sat, Feb 27, 2010 at 06:47:30PM -0800, Brian Lavender wrote:
> I was experimenting with creating an array of arrays. Maybe I shouldn't
> be using GArray but something different such as pointer
I was experimenting with creating an array of arrays. Maybe I shouldn't
be using GArray but something different such as pointer arrays and
allocating memory for each element?
I wrote two sample programs. The first one, just loads one array. The
second, loads an array of arrays. I don't