Re: [gtk-list] Re: Need help



> > Try:
> >     sprintf(command, "tgif %s", variable);
> >     system(command);
> 
> No, don't do that or Alan Cox will eat you alive.  Use g_strdup_printf
> or g_snprintf from glib.

A more generic way is to use, snprintf. Since the 'g_'-functions are
glib-specific. (And I don't see why glib is better...)

/Johan Levin



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