How do you get the path class to accept a windows drive letter? Suppose I have a dir named c:\Foo, the path constructor throws for every combo I can think of c:\\Foo, etc. I can however, say /Foo and everything works. Using boost1_33_1, VS 2005, XP Pro SP2 and linking with libboost_filesystem-vc80-mt-s-1_33_1.lib
Jaye Bass wrote:
How do you get the path class to accept a windows drive letter?
Suppose I have a dir named c:\Foo, the path constructor throws for every combo I can think of c:\\Foo, etc. I can however, say /Foo and everything works.
Using boost1_33_1, VS 2005, XP Pro SP2 and linking with libboost_filesystem-vc80-mt-s-1_33_1.lib
Add the following line of code before you do any path processing: boost::filesystem::path::default_name_check(boost::filesystem::native);
Noah Roberts wrote:
Jaye Bass wrote:
How do you get the path class to accept a windows drive letter?
Using boost1_33_1, VS 2005, XP Pro SP2 and linking with libboost_filesystem-vc80-mt-s-1_33_1.lib
Add the following line of code before you do any path processing:
boost::filesystem::path::default_name_check(boost::filesystem::native);
Or upgrade to Boost 1.34: http://boost.org/libs/filesystem/doc/i18n.html#Simplification -- Daniel Schlyder
participants (3)
-
Daniel Schlyder
-
Jaye Bass
-
Noah Roberts