inital commit

This commit is contained in:
uvos 2023-06-28 23:59:50 +02:00
commit 438c9d726c
19 changed files with 2169 additions and 0 deletions

16
readfile.h Normal file
View file

@ -0,0 +1,16 @@
#pragma once
#include <string>
#include <filesystem>
#include <fstream>
#include <stdexcept>
#include <sstream>
inline std::string readFile(const std::filesystem::path& path)
{
std::ifstream file(path);
if(!file.is_open())
throw std::runtime_error(std::string("could not open file ") + path.string());
std::stringstream ss;
ss<<file.rdbuf();
return ss.str();
}