
hello, I'm using filesystem in the following simple code: namespace fs = boost::filesystem; fs::path p("d:/temp"); and I got an exception saying that "d:" in the input path is invalid. What's wrong? I'm new to the fs lib. Thanks Max

On 4/2/06, Wang Weiwei <wwwang@ccsdl.org> wrote:
namespace fs = boost::filesystem; fs::path p("d:/temp");
and I got an exception saying that "d:" in the input path is invalid.
The constructor you're calling in this case expects the portable path format, not the native one. You need to tell it that it's a native-format path: fs::path p("d:/temp",fs::path::native); // iirc I think this might be changing in the new and improved version in the soon-to-be-released 1.34 however, so you might want to start using/wait for the new version. ~ Scott
participants (2)
-
me22
-
Wang Weiwei