Re: GList & g_printf()

Thomas Deschepper wrote:

Hey everybody :-)

I've manage to creat a Double-Linked List with pointers to some strings.
Is there a function or a combination of functions to print every element
of the list to STDOUT?

I was thinking of g_list_foreach() in combination with g_printf(), but I
wasn't sure...

many thanks, Thomas

GList *l;

for (l = your_list; l; l = l->next) {
   g_print (l->data);


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