glib 1.3 & GArray



I've sent a mail with the following content, 
there is a failure in it
it has not to be 
GArray *array1,array2; 
but
GArray *array1,*array2;

Sorry!


Hello,

theres a problem with the GArray, I can not define, but I need a solution:

1. 2 different GArrays are defined:
        GArray * array1,array2;
2. they are initialized with 
        array1=g_array_new(TRUE,TRUE,sizeof(guint32));
        array2=g_array_new(TRUE,TRUE,sizeof(guint32));
3. I'm filling array1 with elements and its correct (tested)
4. I'm filling array2 and this elements are concatenated to array1
    (actually array1 and array2 are the same, have the same pointer(!!))

If array1 is inititialized and filled -> correct
and then array2 is initialized, the adress of array1 ist overwritten by the
one of array2 and so array1->len==0

Can anyone help me with this problem, cause its very important.

Thanx a lot for all suggestions!

Best regards
Chris

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!



-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!




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