Answers for "c++ open all files in directory"

C++
0

c++ open all files in directory

#include <string>
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;

int main() {
    std::string path = "/path/to/directory";
    for (const auto & entry : fs::directory_iterator(path))
        std::cout << entry.path() << std::endl;
}
Posted by: Guest on October-07-2021

Code answers related to "c++ open all files in directory"

Browse Popular Code Answers by Language