daiki8は片付けができない

片付けしないと

できない

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <functional>
#include <experimental/filesystem>
#include <algorithm>
#include <cassert>
#include <map>
#include <fstream>
#include <random>
#include "Radix.h"

namespace fs = std::experimental::filesystem;

int main()
{
    std::string root = "./testDir";
    fs::create_directories(root);
    
    std::random_device rnd;
    std::mt19937 mt(rnd());
    Radix r;

    // make sample datas
    std::vector<std::pair<std::string, std::string>> sample_datas;
    for (int i = 0; i < 1000; i++) {
        // create old_filenames
        std::string o = std::to_string(mt());

        // create new_filename
        std::string n = r.to((unsigned long long)std::stoll(o), 16);

        sample_datas.emplace_back(std::pair<std::string, std::string>(o, n));
    }


    // create sample files
    for (auto& data : sample_datas) {
        std::string filename = root + "/" + data.first;
        std::ofstream{ filename };
    }

    // rename oldfilename -> newfilename
    for (auto& data : sample_datas) {
        std::string o = root + "/" + data.first;
        std::string n = root + "/" + data.second;
        fs::rename(o, n);
    }

    std::cout << "done." << std::endl;
    getchar();


    return 0;
}