//使用 boost 库#include <iostream>#include <boost/filesystem.hpp>using namespace std;namespace fs = boost::filesystem;string filePath = "C:\\tmp\\data";fs::path dir(filePath);if (fs::create_directory(dir)) { cout << "Success" << "\n";}