#include #include #include int main(int argc, char **argv) { GHashTable* hash; int i; hash = g_hash_table_new(g_str_hash, g_str_equal); g_hash_table_insert(hash, "hello", GINT_TO_POINTER(100)); g_hash_table_insert(hash, "goodbye", GINT_TO_POINTER(200)); i = GPOINTER_TO_INT(g_hash_table_lookup(hash, "hello")); printf("%d\n", i); sleep(120); exit(0); }