push
This commit is contained in:
parent
93978aaf32
commit
1a511386b2
|
|
@ -0,0 +1,26 @@
|
||||||
|
#ifndef BITCOINEXCHANGE_HPP
|
||||||
|
#define BITCOINEXCHANGE_HPP
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class BitcoinExchange
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BitcoinExchange();
|
||||||
|
BitcoinExchange(const BitcoinExchange &other);
|
||||||
|
BitcoinExchange &operator=(const BitcoinExchange &other);
|
||||||
|
~BitcoinExchange();
|
||||||
|
|
||||||
|
void loadDatabase(const std::string &filename);
|
||||||
|
void processInput(const std::string &filename);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<std::string, float> _data;
|
||||||
|
|
||||||
|
float getRate(const std::string &date) const;
|
||||||
|
bool isValidDate(const std::string &date) const;
|
||||||
|
bool isValidValue(const std::string &value, float &out) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -3,7 +3,7 @@ CXXFLAGS = -Wall -Wextra -Werror -std=c++98
|
||||||
OBJDIR = obj
|
OBJDIR = obj
|
||||||
SOURCES = Main.cpp
|
SOURCES = Main.cpp
|
||||||
OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.o))
|
OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.o))
|
||||||
NAME = Easyfind
|
NAME = btc
|
||||||
|
|
||||||
all: $(NAME)
|
all: $(NAME)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue