adding string object to gArray
I want to add some string objects in GArray. But when i read the API manual of
g_array_new(), it seeks the size of the element to be added while creating开发者_开发百科 the array, but
different string objects have different length, so how can i cope with this issue.
Regards, iSight
What you need is GPtrArray, not GArray.
I believe, the size of the element is:
sizeof(gchar*)
You put into array not the actual string, but the pointer to a string.
精彩评论