diff --git a/cpp09/ex00/main.cpp b/cpp09/ex00/main.cpp index 10f9b9e..d888a7a 100644 --- a/cpp09/ex00/main.cpp +++ b/cpp09/ex00/main.cpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/08 12:15:32 by rparodi #+# #+# */ -/* Updated: 2025/04/13 17:35:55 by rparodi ### ########.fr */ +/* Updated: 2025/04/13 17:41:41 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -179,16 +179,16 @@ float check_value(bool more_than_1000, std::string value, enum error_code *error } std::mapparse_input(std::string name) { - enum error_code tmpError; + enum error_code tmpError = NO_ERROR; std::ifstream file(name.c_str()); std::map to_ret; + size_t line = 0; std::string tmpLine; std::string tmpDate; float tmpValue = 0; - size_t line = 0; std::getline(file, tmpLine); if (tmpLine != "date | value") { @@ -259,12 +259,12 @@ void print_result(std::map input, std::map db } std::map get_db() { - enum error_code tmpError; + enum error_code tmpError = NO_ERROR; std::map to_ret; std::ifstream file("data.csv"); - std::string tmpLine; - std::string tmpDate; + std::string tmpLine = ""; + std::string tmpDate = ""; std::getline(file, tmpLine); float tmpValue = 0;