14 std::string
readFile(
const std::string& filePath,
size_t& error) {
15 std::stringstream content;
18 file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
21 content << file.rdbuf();
23 catch (std::ifstream::failure e) {
24 std::clog <<
"Unable to read file " + filePath << std::endl;
std::string readFile(const std::string &filePath, size_t &error)
readFile reads the content of a file and returns it as string.
File reader functionality.