c++ 删除文件 创建目录等操作

创建日期: 2023-05-30 10:26 | 作者: 风波 | 浏览次数: 14 | 分类: C++

参考:https://en.cppreference.com/w/cpp/io/c/remove

删除文件

#include <cstdio>

std::remove("file1.txt");

创建目录

来源:https://stackoverflow.com/questions/50960492/creating-folders-in-c

c++17

#include <filesystem>
namespace fs = std::filesystem;
fs::create_directories("./a/b/c")
14 浏览
10 爬虫
0 评论