Re: Integer to GChar



hi,

g_snprintf can be used to convert gint to string

sample code
g_snprintf (buffer, sizeof(buffer), %d, i);
where buffer is array of gchar

----- Original Message -----
From: Martyn Russell <jackrussell subdimension com>
Date: Saturday, March 9, 2002 2:03 pm
Subject: Re: Integer to GChar


why not use:

gint myint = 1;
sprintf("%d",myint);

or have a look at 'strtol' / 'itoa'.

Martyn


On Sat, 2002-03-09 at 06:56, Gerd Kardel wrote:
Hello,

for a program I'm working on I need to convert Integer results to 
gchar to 
display these valuesa a gtk_label.

Any help will be appreciated.

Gerd
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]