views:

71

answers:

1

I am trying to understand portable generic path format and everything is not clicking. Can someone please explain this in terms of examples? I also have been told that I can use the forward slash in windows because windows understands both. Also is it considered good/safe style to use forward slash in windows?

+1  A: 

I think an example is just a/b/c—the portable path format follows POSIX conventions. If you use boost::basic_path, you don't have to care about the correct slashes, the library knows how to convert the portable format to the native format. However, you should always use boost::wpath instead of boost::path, otherwise (I think) you cannot work with Unicode filenames on Windows.

Philipp