Re: [gtk-list] Re: newbie: Gint to string ?
- From: Jasper Spaans <spaans vvtp tn tudelft nl>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: newbie: Gint to string ?
- Date: Tue, 26 Oct 1999 00:17:48 +0200
On Mon, Oct 25, 1999 at 05:46:51PM -0400, Matthew D Allen wrote:
> Use sprintf(); This isn't a GTK+ question, it's one about the C language
> pretty much. gint's are practically equivalent to regular integers if
> they aren't just straight out typedef'd to int's.
>
> char buffer[512];
>
> sprintf(buffer,"%d",my_gint_value);
>
> foolabel = gtk_label_new(buffer);
>
> Hope it helps.
One comment; in the context of gtk+, glib will be available, so it's better
to use g_snprintf or even g_strdup_printf
Regards,
--
Q_. Jasper Spaans <mailto:jspaans@mediakabel.nl> -o)
`~\ Conditional Access/DVB-C/OpenTV/Unix-adviseur /\\
Mr /\ _\_v
Zap
PGP signature
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]