std::string current_line{playerText.getString() + ", " + std::to_string(points)};
- std::ifstream highscore_file_r{data["game_constants"]["highscore_file"]};
+ std::ifstream highscore_file_r{data["game_constants"]["highscore_file"].get<std::string>()};
std::vector<std::string> lines_read;
std::vector<std::string> lines_write;
for (std::string one_line; std::getline(highscore_file_r, one_line);lines_read.push_back(one_line));
highscore_file_r.close();
- std::ofstream highscore_file_w{data["game_constants"]["highscore_file"]};
+ std::ofstream highscore_file_w{data["game_constants"]["highscore_file"].get<std::string>()};
for (std::string::size_type line_count{0}; line_count < lines_write.size(); highscore_file_w << lines_write[line_count++] << std::endl);
highscore_file_w.close();
}
\ No newline at end of file
// Scorelist
// -----------------------------------------------------------------------
- std::ifstream highscore_file_r{data["game_constants"]["highscore_file"]};
+ std::ifstream highscore_file_r{data["game_constants"]["highscore_file"].get<std::string>()};
std::string csv_content{};
int index{0};