2009/6/3 Hubert Figuiere <[email protected]>

> On 06/03/2009 02:08 PM, Fabrício Godoy wrote:
>
>> Thank you.
>>
>> Can you say why the following code compile but don't work?
>>
>>
>> template<class T1, class T2, class T3>
>> Glib::ustring build_filename(const T1&  str1, const T2&  str2, const T3&
>>  str3)
>> {
>>     Glib::ustring ustr1 = Glib::ustring::compose("%1", str1);
>>     Glib::ustring ustr2 = Glib::ustring::compose("%1", str2);
>>     Glib::ustring ustr3 = Glib::ustring::compose("%1", str3);
>>
>>     gchar* path;
>>
>>     path = g_build_filename(ustr1.c_str(), ustr2.c_str(), ustr3.c_str());
>>
>>
> Because, as written in the Fine Manual, you must end the argument list with
> NULL.

I can't believe, I missed this o my copies and pastes.
Sorry and thanks.


>
>
> There is also Glib::build_filename()
>
> Since your description of "doesn't work" is missing I assume you are either
> getting a crash or garbage, depending on the phase of the moon and the age
> of the captain.

You make me laugh :)
I was getting a crash.


>
>
> Hub
>
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to