Re: sprintf and clists



On 25 Jun 2002, Sven Neumann wrote:

got it. ;-)
M.

> Hi,
>
> Sean Holt <mordist cox net> writes:
>
> > gchar buffer[1024];
> >
> > sprintf(buffer, "%d", some_dumb_int);
> > cclist[0] = strdup(buffer);
>
> or in one line w/o the risk of buffer overflows:
>
> cclist[0] = g_strdup_printf ("%d", some_dumb_int);
>
>
> Salut, Sven
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>

 ____                 _____
|  _ \  ___ ___  _ __| ____|
| | | |/ __/ _ \| '__|  _|
| |_| | (_| (_) | |  | |___
|____/ \___\___/|_|  |_____|





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