【发布时间】:2011-04-25 13:16:05
【问题描述】:
如何在 Windows 上使用boost::filesystem::path 指定相对路径?此尝试失败:
boost:filesystem::path full_path("../asset/toolbox"); // invalid path or directory.
也许帮我调试一下,如何用 boost::filesystem 获取当前工作目录?
【问题讨论】:
-
澄清一下,我解决了我的问题。上述方法对于相对路径访问是正确的。然而,在 MSVS 中,当前的工作目录并不是我所期望的。 hmuelner 的 currentpath() 提供了帮助。
标签: c++ boost filesystems