开发者

Cross-platform compatible directory creation in C++

I need to 开发者_Go百科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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜