1
0

」 feat: finished ex00

This commit is contained in:
2025-06-03 11:41:31 +02:00
parent 003d8663d0
commit de9bd7ed8d
5 changed files with 166 additions and 18 deletions

View File

@ -6,23 +6,26 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/21 10:34:50 by adjoly #+# #+# */
/* Updated: 2025/05/30 20:30:28 by adjoly ### ########.fr */
/* Updated: 2025/06/03 11:31:50 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include <BitcoinExchange.hpp>
#include <cstdlib>
#include <exception>
#include <stdexcept>
int main(int ac, char **av) {
(void)av;
if (ac > 1) {
CsvParser *parser;
BitcoinExchange *btc;
try {
parser = new CsvParser();
} catch (std::exception &e) {
std::cerr << "Error: " << e.what() << std::endl;
btc = new BitcoinExchange(av[1]);
btc->print();
} catch (std::runtime_error &e) {
std::cout << e.what() << std::endl;
}
delete btc;
} else {
std::cout << "Error: could not open file." << std::endl;
}