开发者

How to convert an integer to a string in GLib?

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?


  1. gchar *my_string = g_strdup_printf("%i", my_integer);
  2. 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?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜