From 40ea42fe7b5f49da064ddee0e01014b54692c8bd Mon Sep 17 00:00:00 2001 From: y-syo Date: Mon, 1 Sep 2025 16:35:02 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=97=91=EF=B8=8F=E3=80=8D=20clean?= =?UTF-8?q?(ex00):=20cleaned=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ex00/BitcoinExchange.cpp | 5 ----- ex00/input.txt | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ex00/BitcoinExchange.cpp b/ex00/BitcoinExchange.cpp index ca6a599..5053d88 100644 --- a/ex00/BitcoinExchange.cpp +++ b/ex00/BitcoinExchange.cpp @@ -14,13 +14,8 @@ Date::Date(void) Date::Date(std::string str) { for (size_t i = 0; str[i]; ++i) - { if (!isdigit(str[i]) && !((i == (str.length() - 6) || i == (str.length() - 3)) && str[i] == '-')) - { - std::cout << str.length() - 6 << i << std::endl; throw std::invalid_argument("invalid date."); - } - } _value = 0; for (std::string::iterator it = str.begin(); it < str.end(); ++it) diff --git a/ex00/input.txt b/ex00/input.txt index 036082f..fcd08dd 100644 --- a/ex00/input.txt +++ b/ex00/input.txt @@ -1,5 +1,7 @@ date | value 2002.01-2 | 5 + +2011-01-03 | 1971-01-02 | 5 1971-31-02 | 5 2011-01-03 | 3