diff --git a/cpp_09/BitcoinExchange.cpp b/cpp_09/BitcoinExchange.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/ex00/BitcoinExchange.cpp b/ex00/BitcoinExchange.cpp new file mode 100644 index 0000000..df535ac --- /dev/null +++ b/ex00/BitcoinExchange.cpp @@ -0,0 +1,18 @@ +#include "BitcoinExchange.hpp" + +BitcoinExchange::BitcoinExchange() +{} + +BitcoinExchange::BitcoinExchange(const BitcoinExchange &other) +{ + this->_data = other._data; +} + +BitcoinExchange::~BitcoinExchange() +{} + +BitcoinExchange &BitcoinExchange::operator=(const BitcoinExchange &other) +{ + this->_data = other._data; + return (*this); +} diff --git a/cpp_09/BitcoinExchange.hpp b/ex00/BitcoinExchange.hpp similarity index 99% rename from cpp_09/BitcoinExchange.hpp rename to ex00/BitcoinExchange.hpp index 62855e5..24aff7f 100644 --- a/cpp_09/BitcoinExchange.hpp +++ b/ex00/BitcoinExchange.hpp @@ -14,13 +14,12 @@ class BitcoinExchange void loadDatabase(const std::string &filename); void processInput(const std::string &filename); - - private: - std::map _data; - float getRate(const std::string &date) const; bool isValidDate(const std::string &date) const; bool isValidValue(const std::string &value, float &out) const; + + private: + std::map _data; }; #endif diff --git a/ex00/Makefile b/ex00/Makefile index 06e53cf..b31ee8e 100644 --- a/ex00/Makefile +++ b/ex00/Makefile @@ -1,7 +1,7 @@ CXX = c++ CXXFLAGS = -Wall -Wextra -Werror -std=c++98 OBJDIR = obj -SOURCES = Main.cpp +SOURCES = Main.cpp BitcoinExchange.cpp OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.o)) NAME = btc