Re: Question about gchar & g_strconcat()



On Wed, Sep 12, 2007 at 08:20:18PM +0200, fred238 free fr wrote:
> gchar *file;
> file="test";
>           
> file = g_strconcat("/some/path/", file, ".txt", NULL);
> g_printf("%s", file);
> 
> 
> My question is do i must allocate memory for file ?

The topic of this list is the development of Gtk+, not with
Gtk+.  Direct questions like this to gtk-list.

The short answer is: No, but you have to *free* it.  See the
documentation of g_strconcat().  And you should use
g_build_filename().

Yeti

--
http://gwyddion.net/



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