ensure path exists
This commit is contained in:
parent
eeb7f77911
commit
cf024f1c4c
3 changed files with 9 additions and 8 deletions
3
main.cpp
3
main.cpp
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue