启动程序时,我想使用current_path()(“C:\ workspace \ projects”)打印当前路径。然后我希望能够改变路径,可以说“c:\ program files”,所以当我再次打印current_path()时,我想打印出“c:\ program files”。像这样的东西如何使用Boost.Filesystem更改当前路径
int main()
{
cout << current_path() << endl; // c:\workspace\projects
aFunctionToChangePath("c:\program files");
cout << current_path() << endl; // c:\program files
}
在图书馆有一个函数,我失踪了,所以我可以实现这个吗?
是否允许为操作系统的具体情况? – RedX 2011-04-15 13:44:12
是的,它也是这样的 – Kobe 2011-04-15 13:50:21