Re: Passing a gint to a label...
- From: Will Benton <bentonw stolaf edu>
- To: <scherfa fh-trier de>
- Cc: <g gabriele europe com>, <gtk-list redhat com>
- Subject: Re: Passing a gint to a label...
- Date: Tue, 27 Jun 2000 15:14:53 -0500
scherfa@fh-trier.de writes:
> "G.Gabriele" wrote:
> >
> > Hi all,
> >
> > I need to put in a label a gint value...
> >
> > void pass-help (gint value)
> > {
> > gtk_label_set_text( GTK_LABEL(label), value);
> > }
> >
> > How could I do that ?
> >
> Maybe this way :
> void pass-help (gint value)
> {
> gchar * buffer;
> buffer = (gchar *)g_malloc(sizeof(value));
> g_snprintf(buffer,sizeof(value),"%d",value);
> g_free(buffer);
> }
> > Thanks,
> > G.Gabriele
In any case, "pass-help" is not a valid C identifier. :-)
wb
---
Will Benton '00 | student emeritus and emissary lead developer
bentonw@stolaf.edu | web waste: http://woggo.webfreekz.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]