I want to convert an intege开发者_StackOverflow社区r value to string in GLib. Is there any macro or function to da that? Or Can i store different data types in the same doubly linked list?
gchar *my_string = g_strdup_printf("%i", my_integer);
- Yes, you can store any pointer you want, or even an integer using
GINT_TO_POINTER
, but how will you know what data type to get back out?
精彩评论