#ifndef MISC_CPP #define MISC_CPP #include #include #include #include "misc.hpp" void print(const std::string s) { std::cout << s << std::endl; } std::string fileBufferToString(const std::string filePath, std::ifstream &file) { std::string sourceCode; // open files file.open(filePath); // read file's buffer contents into streams std::stringstream fileStream; fileStream << file.rdbuf(); // close file handlers file.close(); // convert stream into string sourceCode = fileStream.str(); return sourceCode; } #endif