views:

61

answers:

2

I need to dynamically create directory based on input filenames in C++ and it must be cross-platform compatible. I am also familiar with the boost library. The input to the directory creation function will be a string with the following prototype:

void createDirectory (std::string name)

Sample code would be much appreciated.

+6  A: 

If Boost is fine, take a look at create_directory() from Boost.Filesystem.

Georg Fritzsche
A: 

Without Boost (or other cross-platform framework like Qt, wxWidgets) or some future revision of the C++ sandard, you're out of luck.

You can use boost::filesystem.

rubenvb