Re: Simple way to list keys & values of a GHashTable object?

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

 



I'll study it.
Thank You!

Ric.

On Nov 10, 2010, at 2:53 PM, Tadej Borovšak wrote:

> Hi.
> 
> For simple printout, you may be interested in g_hash_table_foreach().
> Something like this should dump key-value pairs to console (I assumed
> here that both key and value are strings):
> 
> ===
> static void
> dump_pair (const char *key,
>           const char *value)
> {
>  g_print ("Key: %s Value: %s\n", key, value);
> }
> 
> ...
> 
> g_hash_table_foreach (table, (GHFunc)dump_pair, NULL);
> ===
> 
> Cheers,
> Tadej
> 
> -- 
> Tadej Borovšak
> tadeboro.blogspot.com
> tadeboro@xxxxxxxxx
> tadej.borovsak@xxxxxxxxx

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux