|
Boost Users : |
From: Cory Nelson (phrosty_at_[hidden])
Date: 2004-11-29 23:45:36
You can either construct the "hello world" path with the different
checker or set it by default:
boost::filesystem::path::default_name_check(boost::filesystem::native);
I suppose spaces aren't allowed by default to give maximum portability.
On Tue, 30 Nov 2004 11:30:34 +1100, Richard Wolf <rwolf_at_[hidden]> wrote:
> Hi
>
> I'm trying to use the filesystem library, and I get an abort when trying
> to initialise a path object with a string containing a space.
>
> #include <boost/filesystem/path.hpp>
> #include <iostream>
>
> int main()
> {
> boost::filesystem::path p1("hello");
> std::cout << p1.string();
> boost::filesystem::path p2("hello world");
> std::cout << p2.string();
>
> }
>
> when run, this prints:
>
> helloAborted
>
> I couldn't find anything saying that the string path constructor can't
> contain a space.
>
> Am I doing something wrong, or is this a bug?
>
> Using gcc 3.3.4 on Debian.
>
> thanks,
>
> Richard
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- Cory Nelson http://www.int64.org
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net