#include <iostream>
#include <set>
#include <filesystem>

int main(int argc, char const *argv[]) {
  std::set<std::filesystem::path> sorted_by_name;

  for (const auto &entry : std::filesystem::directory_iterator("/home/user")) {
    sorted_by_name.insert(entry.path());
  }

  for (auto &filename : sorted_by_name) {
    std::cout << filename.c_str() << std::endl;
  }

  return 0;
}
