开发者

How to convert an integer to a string in GLib?

开发者 https://www.devze.com 2022-12-23 05:06 出处:网络
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?

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

精彩评论

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

关注公众号