Something went wrong. Try again.
Youtube chat viewer inspired by chatterino
Something went wrong. Try again.
123456789101112131415161718192021222324252627#include "config.h"
namespace Config { void Save(Config config) { std::ofstream file("config.json");
nlohmann::json data = config; file << data.dump(); file.close(); }
Config Read() { std::ifstream file("config.json"); if (file.is_open()) { std::stringstream stream;
stream << file.rdbuf(); Config config = nlohmann::json::parse(stream); return config; }
auto empty_config = Config{}; Save(empty_config);
return empty_config; }}