开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜