1#include <string>
2#include <iostream>
3#include <filesystem>
4namespace fs = std::filesystem;
5
6int main()
7{
8 std::string path = "/path/to/directory";
9 for (const auto & entry : fs::directory_iterator(path))
10 std::cout << entry.path() << std::endl;
11}
12