glist



Hi, I have this struct:
struct __db_table {
 GList *attrib;
 GString *name_table;
 int mod; /* attributo che indica se e' stata modificata */
};

and with this code I crate a double-link list:
tmp_db_table.attrib = NULL;
    tmp_db_table.name_table = g_string_new(g_db_return_item(db,i,0));
    table2 = g_list_append(table2, &tmp_db_table);


and the code works. But Now I want to insert the new double-linked list in
the
"attrib" GList and I do not know how can I make it. And there is another
problem. I want to know how can I get access to the "name_table" GString
attrib.
If I use this C code (does not works) the gcc respond me with an error:
(gchar *)table2->data.name_table

Ah, I have tried to leave "gchar *" and insert "struct __db_table" but it
does not work..and the error is:
request for member `name_table' in something not a structure or union

any help ?

tnx


ciaoz

Ho sentito urla di sudore... che schifo...
--
Michel <ZioBudda> Morelli		  michel@michel.enter.it
					http://ziobudda.enter.it
Problemi con Linux ?    mailto:linux@saturn.media.dsi.unimi.it



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