开发者

Cross-platform compatible directory creation in C++

开发者 https://www.devze.com 2023-01-06 18:57 出处:网络
I need to 开发者_Go百科dynamically create directorybased 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 creat

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

精彩评论

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