1
如何將相對路徑轉換爲C++和gtk下的絕對路徑?如何將相對路徑轉換爲C++/gtkmm下的絕對路徑?
如何將相對路徑轉換爲C++和gtk下的絕對路徑?如何將相對路徑轉換爲C++/gtkmm下的絕對路徑?
// For C++ with Gnome Gtkmm3 libraries
#include <string>
#include <glibmm.h>
#include <giomm.h>
using namespace std;
string PathRel2Abs(string relpath) {
Glib::RefPtr<Gio::File> file = Gio::File::create_for_path(relpath);
return file->get_path();
}