ensure path exists

This commit is contained in:
bronku 2025-11-14 00:20:58 +01:00
parent eeb7f77911
commit cf024f1c4c
3 changed files with 9 additions and 8 deletions

View file

@ -9,6 +9,9 @@
void generate_file(int N, const std::string& filename)
{
std::filesystem::path dirPath = std::filesystem::path(filename).parent_path();
std::filesystem::create_directories(dirPath);
std::ofstream out_stream(filename);
Writer output(out_stream);