随笔分类 - C++
C++语言
摘要:#include <iostream> #include <fstream> using namespace std; int main() { ifstream infile; try { infile.open("file.txt"); if (!infile) { throw runtime_
阅读全文
摘要:#include <iostream> #include <filesystem> namespace fs = std::filesystem; void traverseDirectory(const std::string& path) { for (const auto& entry : f
阅读全文