Adding custom structure to GSList with Glib
问题 I'm trying to add a structure to a singly linked list with the function g_slist_append(list, &structure). This seems to work (it's adding the pointer), however I can't seem to find a way to view the elements in the structure when reading the linked list. My structure looks like this: struct customstruct { int var1; int var2; char *string_1; } Then, I make a list: GSList *list = NULL; Then, I append one instance of the structure like this: struct customstruct list_entry; list_entry.var1 = 1;