How to convert integer to string in GLib?

I want to convert an integer value to a string in GLib. Is there any macro or function for this? Or Can I store different types of data in the same doubly linked list?

+3
source share
1 answer
  • gchar *my_string = g_strdup_printf("%i", my_integer);
  • Yes, you can save any desired pointer or even an integer with GINT_TO_POINTER, but how do you know which data type will be returned?
+4
source

Source: https://habr.com/ru/post/1737657/


All Articles