Re: Get gchar* from Glib::ustring
- From: Fabrício Godoy <skarllot gmail com>
- To: Philipp Kerling <pkerling casix org>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Get gchar* from Glib::ustring
- Date: Wed, 3 Jun 2009 15:08:34 -0300
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());
Glib::ustring r_path(path); g_free(path);
return r_path;}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]